lib/landrush/server.rb in landrush-0.15.4 vs lib/landrush/server.rb in landrush-0.16.0
- old
+ new
@@ -59,9 +59,18 @@
else
transaction.passthrough!(server.upstream)
end
end
+ match(/.*/, IN::PTR) do |transaction|
+ host = Store.hosts.find(transaction.name)
+ if host
+ transaction.respond!(Name.create(Store.hosts.get(host)))
+ else
+ transaction.passthrough!(server.upstream)
+ end
+ end
+
# Default DNS handler
otherwise do |transaction|
transaction.passthrough!(server.upstream)
end
end