Something to do with the way Rack::URLMap matches against the map, it uses the env["SERVER_NAME"] which for some reason, Phusion passenger sets to "_", I've written a money patch that sets it to the same value as env["HTTP_HOST"] which solves the problem.
class Rack::URLMap alias_method :old_call, :call def call(env) env["SERVER_NAME"] = env["HTTP_HOST"] old_call(env) end end
You can now use Rack::URLMap as usual and it'll work as expected.
Total money, thanks!
ReplyDelete