From: Tom Hughes Date: Tue, 10 Mar 2015 12:10:12 +0000 (+0000) Subject: Monkey patch the port number in the rack request X-Git-Tag: live~4687 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/88f8544d8cbf8ef099a5df9be85dcbcec300a013?ds=inline Monkey patch the port number in the rack request https://github.com/phusion/passenger/issues/1421 --- diff --git a/config/initializers/rack_request.rb b/config/initializers/rack_request.rb new file mode 100644 index 000000000..c5643d75d --- /dev/null +++ b/config/initializers/rack_request.rb @@ -0,0 +1,10 @@ +# Hack to workaround https://github.com/phusion/passenger/issues/1421 +if defined?(PhusionPassenger) + module Rack + class Request + def port + DEFAULT_PORTS[scheme] + end + end + end +end