Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement secure cookies by default #2107

Merged
2 changes: 1 addition & 1 deletion app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def successful_login(notice = nil)
flash[:notice] = notice || "You have successfully logged in, #{@user.display_name}."
if params[:remember_me] == 'on'
@user.remember_me unless @user.remember_token?
cookies[:auth_token] = { value: @user.remember_token, expires: @user.remember_token_expires_at }
cookies[:auth_token] = { value: @user.remember_token, expires: @user.remember_token_expires_at, same_site: :strict }
end
respond_to do |format|
return_to_path = determine_return_path_after_login
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# (create the session table with "rails generate session_migration")
SEEK::Application.config.session_store(:active_record_store,
key: '_seek_session',
expire_after: Seek::Config.session_store_timeout)
expire_after: Seek::Config.session_store_timeout, same_site: :lax)
Loading