aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-11-25 10:55:03 +0100
committerGitHub <noreply@github.com>2016-11-25 10:55:03 +0100
commit6c873236d4384e6a89981a524867ddee4828097a (patch)
treef2696018f1e3e8527550ee346f276592d1625690 /actionpack
parentbce2e64e1022dc48577a7b6090fa79adcb559d11 (diff)
parentda1453e6bad5551dd85f9692b921e1ff770d0319 (diff)
downloadrails-6c873236d4384e6a89981a524867ddee4828097a.tar.gz
rails-6c873236d4384e6a89981a524867ddee4828097a.tar.bz2
rails-6c873236d4384e6a89981a524867ddee4828097a.zip
Merge pull request #27140 from supercaracal/fix-force-ssl-if-session-store-disabled
Fix a force ssl redirection bug that occur when session store disabled.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/metal/force_ssl.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/force_ssl.rb b/actionpack/lib/action_controller/metal/force_ssl.rb
index b8976497a4..9d43e752ac 100644
--- a/actionpack/lib/action_controller/metal/force_ssl.rb
+++ b/actionpack/lib/action_controller/metal/force_ssl.rb
@@ -89,7 +89,7 @@ module ActionController
end
secure_url = ActionDispatch::Http::URL.url_for(options.slice(*URL_OPTIONS))
- flash.keep if respond_to?(:flash)
+ flash.keep if respond_to?(:flash) && request.respond_to?(:flash)
redirect_to secure_url, options.slice(*REDIRECT_OPTIONS)
end
end