aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorMarcin Bunsch and Przemek DÄ…bek <marcin+przemek.dabek@futuresimple.com>2012-01-12 20:31:23 +0100
committerMarcin Bunsch <marcin@futuresimple.com>2012-01-12 20:31:23 +0100
commit321dae5dccded1eff6587582c8f0e0b88ca8303c (patch)
tree5376ad08d11d5c659a11f96896b74b4ecd71afd7 /actionpack/lib
parente927f06b2528bef52087dd12f012c20ab26fb59c (diff)
downloadrails-321dae5dccded1eff6587582c8f0e0b88ca8303c.tar.gz
rails-321dae5dccded1eff6587582c8f0e0b88ca8303c.tar.bz2
rails-321dae5dccded1eff6587582c8f0e0b88ca8303c.zip
When force redirecting to SSL, make sure that the session is kept. As we're moving from a non-secure to secure environment, it's safe
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/metal/force_ssl.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/force_ssl.rb b/actionpack/lib/action_controller/metal/force_ssl.rb
index 0fd42f9d8a..b45f211e83 100644
--- a/actionpack/lib/action_controller/metal/force_ssl.rb
+++ b/actionpack/lib/action_controller/metal/force_ssl.rb
@@ -29,6 +29,7 @@ module ActionController
if !request.ssl? && !Rails.env.development?
redirect_options = {:protocol => 'https://', :status => :moved_permanently}
redirect_options.merge!(:host => host) if host
+ flash.keep
redirect_to redirect_options
end
end