Mercurial > prosody-modules
changeset 99:2d03350613c4
mod_srvinjection: Added support for resolving "localhost" and "127.0.0.1".
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 26 Nov 2009 20:23:20 +0500 |
parents | a54cc7bca826 |
children | 999a4b3e699b |
files | mod_srvinjection/mod_srvinjection.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_srvinjection/mod_srvinjection.lua Wed Nov 25 21:36:21 2009 +0100 +++ b/mod_srvinjection/mod_srvinjection.lua Thu Nov 26 20:23:20 2009 +0500 @@ -31,6 +31,9 @@ handler(mapping); return; end + elseif qtype == "A" and (qname == "localhost." or qname == "127.0.0.1.") then + handler({{ a = "127.0.0.1" }}); + return; end return original_lookup(handler, qname, qtype, qclass); end