diff mod_srvinjection/mod_srvinjection.lua @ 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 c1f4edf3bea7
children e4d5a1d3ff44
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