summaryrefslogtreecommitdiff
path: root/lib/rack/request.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rack/request.rb')
-rw-r--r--lib/rack/request.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rack/request.rb b/lib/rack/request.rb
index e8734d76..6f044195 100644
--- a/lib/rack/request.rb
+++ b/lib/rack/request.rb
@@ -100,6 +100,8 @@ module Rack
port.to_i
elsif @env.has_key?("HTTP_X_FORWARDED_HOST")
DEFAULT_PORTS[scheme]
+ elsif @env.has_key?("HTTP_X_FORWARDED_PROTO")
+ DEFAULT_PORTS[@env['HTTP_X_FORWARDED_PROTO']]
else
@env["SERVER_PORT"].to_i
end