diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-02-11 19:41:27 -0500 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-02-23 16:09:44 -0500 |
commit | 6edfcdd4aa896dbbf431fcf3992e0d1cd2dac3b2 (patch) | |
tree | 1322bbc98894448517f8b183fd0590cdbd123b28 /actionpack/test | |
parent | e9b96f0d666adfd3484641a4a55feb1c774d3378 (diff) | |
download | rails-6edfcdd4aa896dbbf431fcf3992e0d1cd2dac3b2.tar.gz rails-6edfcdd4aa896dbbf431fcf3992e0d1cd2dac3b2.tar.bz2 rails-6edfcdd4aa896dbbf431fcf3992e0d1cd2dac3b2.zip |
Fix `request.ssl?` bug with Action Cable
This bug affects `wss://` requests when running Action Cable in-app.
Fixes #23620.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/force_ssl_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/force_ssl_test.rb b/actionpack/test/controller/force_ssl_test.rb index 22f1cc7c22..03a9c9ae78 100644 --- a/actionpack/test/controller/force_ssl_test.rb +++ b/actionpack/test/controller/force_ssl_test.rb @@ -322,3 +322,12 @@ class RedirectToSSLTest < ActionController::TestCase assert_equal 'ihaz', response.body end end + +class ForceSSLControllerLevelTest < ActionController::TestCase + def test_no_redirect_websocket_ssl_request + request.env['rack.url_scheme'] = 'wss' + request.env['Upgrade'] = 'websocket' + get :cheeseburger + assert_response 200 + end +end |