diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2010-08-19 15:29:54 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-08-20 10:40:34 -0300 |
commit | 0d0fbf1e648606c9499e332bad412da005a4e37f (patch) | |
tree | c6448eaf8d844c27b102b11009172784767d4588 /actionpack/lib/action_dispatch/routing | |
parent | 771d2f918fc87bdd4f83e6666fd816e9f0dcedfb (diff) | |
download | rails-0d0fbf1e648606c9499e332bad412da005a4e37f.tar.gz rails-0d0fbf1e648606c9499e332bad412da005a4e37f.tar.bz2 rails-0d0fbf1e648606c9499e332bad412da005a4e37f.zip |
Don't add the standard https port when using redirect in routes.rb and ensure that request.scheme returns https when using a reverse proxy.
[#5408 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 5c5e7ed612..800c6b469e 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -288,7 +288,7 @@ module ActionDispatch uri = URI.parse(path_proc.call(*params)) uri.scheme ||= req.scheme uri.host ||= req.host - uri.port ||= req.port unless req.port == 80 + uri.port ||= req.port unless req.standard_port? body = %(<html><body>You are being <a href="#{ERB::Util.h(uri.to_s)}">redirected</a>.</body></html>) |