]> git.openstreetmap.org Git - rails.git/commitdiff
Monkey patch the port number in the rack request
authorTom Hughes <tom@compton.nu>
Tue, 10 Mar 2015 12:10:12 +0000 (12:10 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 10 Mar 2015 12:10:12 +0000 (12:10 +0000)
https://github.com/phusion/passenger/issues/1421

config/initializers/rack_request.rb [new file with mode: 0644]

diff --git a/config/initializers/rack_request.rb b/config/initializers/rack_request.rb
new file mode 100644 (file)
index 0000000..c5643d7
--- /dev/null
@@ -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