Skip to content
Snippets Groups Projects
Commit 69997ee2 authored by smayer's avatar smayer
Browse files

Switch session_store to cookie_store (so that ActionCable works and for better scalability)

parent 38173633
No related branches found
No related tags found
1 merge request!2Merging development into onb as preparation for Annolyzer release
...@@ -9,12 +9,9 @@ module ApplicationCable ...@@ -9,12 +9,9 @@ module ApplicationCable
end end
def find_user def find_user
current_user = User.find_by(labs_user_id: "2") if current_user = User.find_by(id: cookies.encrypted['_web_session']['current_user_id'])
if current_user
# puts "Current user case, id #{current_user.id}"
current_user current_user
else else
puts "Unauthorized connection rejected"
reject_unauthorized_connection reject_unauthorized_connection
end end
end end
......
Rails.application.config.session_store :active_record_store, :key => "_web_session" Rails.application.config.session_store :cookie_store, :key => "_web_session"
# Run this regularly to clean up DB: 'rails db:sessions:trim' # Run this regularly to clean up DB: 'rails db:sessions:trim'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment