Skip to content
Snippets Groups Projects
Commit 69bf1163 authored by abcang's avatar abcang Committed by Eugen Rochko
Browse files

Add secure option to additional cookie (#8069)

parent b62ec00d
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ Warden::Manager.after_set_user except: :fetch do |user, warden|
value: session_id,
expires: 1.year.from_now,
httponly: true,
secure: (Rails.env.production? || ENV['LOCAL_HTTPS'] == 'true'),
}
end
......@@ -18,6 +19,7 @@ Warden::Manager.after_fetch do |user, warden|
value: warden.cookies.signed['_session_id'] || warden.raw_session['auth_id'],
expires: 1.year.from_now,
httponly: true,
secure: (Rails.env.production? || ENV['LOCAL_HTTPS'] == 'true'),
}
else
warden.logout
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment