aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware
diff options
context:
space:
mode:
authorGeoff Buesing <gbuesing@gmail.com>2013-06-23 19:58:02 -0500
committerGeoff Buesing <gbuesing@gmail.com>2013-06-23 20:01:20 -0500
commitd8bf1f22ded16e37b3f18b942c8ae49ea79e3d79 (patch)
tree4e9ed751a5df9342c5ad59ad3646deee3034b83d /actionpack/lib/action_dispatch/middleware
parent11ac1e8a2ce9b12fce829088e1000328687d0cf4 (diff)
downloadrails-d8bf1f22ded16e37b3f18b942c8ae49ea79e3d79.tar.gz
rails-d8bf1f22ded16e37b3f18b942c8ae49ea79e3d79.tar.bz2
rails-d8bf1f22ded16e37b3f18b942c8ae49ea79e3d79.zip
ActionDispatch:SSL: don't include STS header in non-https responses
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r--actionpack/lib/action_dispatch/middleware/ssl.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/ssl.rb b/actionpack/lib/action_dispatch/middleware/ssl.rb
index 9e03cbf2b7..68ced4e40c 100644
--- a/actionpack/lib/action_dispatch/middleware/ssl.rb
+++ b/actionpack/lib/action_dispatch/middleware/ssl.rb
@@ -36,8 +36,7 @@ module ActionDispatch
url.scheme = "https"
url.host = @host if @host
url.port = @port if @port
- headers = hsts_headers.merge('Content-Type' => 'text/html',
- 'Location' => url.to_s)
+ headers = { 'Content-Type' => 'text/html', 'Location' => url.to_s }
[301, headers, []]
end