0
0
Fork 0

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.
This commit is contained in:
Sorin Davidoi 2018-09-08 23:54:28 +02:00 committed by Eugen Rochko
parent 7607f4778b
commit 6f3d934bc1
3 changed files with 4 additions and 1 deletions

View file

@ -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