From 88f8544d8cbf8ef099a5df9be85dcbcec300a013 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 10 Mar 2015 12:10:12 +0000 Subject: [PATCH] Monkey patch the port number in the rack request https://github.com/phusion/passenger/issues/1421 --- config/initializers/rack_request.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 config/initializers/rack_request.rb 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 -- 2.39.5