From 6f3d934bc1c11e7c316e5956c59d4e37541c8737 Mon Sep 17 00:00:00 2001 From: Sorin Davidoi Date: Sat, 8 Sep 2018 23:54:28 +0200 Subject: feat(cookies): Use the same-site attribute to lax (#8626) CSFR-prevention is already implemented but adding this doesn't hurt. A brief introduction to Same-Site cookies (and the difference between strict and lax) can be found at https://blog.mozilla.org/security/2018/04/24/same-site-cookies-in-firefox-60/ TLDR: We use lax since we want the cookies to be sent when the user navigates safely from an external site. --- spec/rails_helper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'spec/rails_helper.rb') diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index c575128e4..79e80220c 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -29,6 +29,7 @@ Devise::Test::ControllerHelpers.module_eval do value: resource.activate_session(warden.request), expires: 1.year.from_now, httponly: true, + same_site: :lax, } end end -- cgit