aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable/connection/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/action_cable/connection/base.rb')
-rw-r--r--lib/action_cable/connection/base.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb
index 52f94a7ab0..295b71ecb3 100644
--- a/lib/action_cable/connection/base.rb
+++ b/lib/action_cable/connection/base.rb
@@ -109,6 +109,14 @@ module ActionCable
end
protected
+ def request
+ @request ||= ActionDispatch::Request.new(Rails.application.env_config.merge(env))
+ end
+
+ def cookies
+ request.cookie_jar
+ end
+
def initialize_connection
server.add_connection(self)
@@ -173,10 +181,6 @@ module ActionCable
@websocket && @websocket.ready_state == Faye::WebSocket::API::OPEN
end
- def request
- @request ||= ActionDispatch::Request.new(env)
- end
-
def websocket?
@is_websocket ||= Faye::WebSocket.websocket?(@env)
end