Open
Description
SameSite=strict
effectively prevents Cookie-based CRSF attacks and it also brings the benefit of simplifying our code. From Wikipedia:
An additional "SameSite" attribute can be included when the server sets a cookie, instructing the browser on whether to attach the cookie to cross-site requests. If this attribute is set to "strict", then the cookie will only be sent on same-origin requests, making CSRF ineffective.
Browser support is pretty good on it. It also means cookies will never be send to other domains like when STATIC_URL_PREFIX
is set differently, but as far as I'm aware, cookies are not needed for static assets.
Related: #5583