Closed crstffr closed 6 years ago
Thanks for sharing, I wasn't familiar with the SameSite spec yet. I agree it would be nice to support this feature, the only reservation I have is that the spec is still in Draft state. Do you have any insight into whether the SameSite functionality is likely to be consolidated into RFC6265 and adopted by the major browser vendor?
Perhaps support for SameSite (Strict+Lax) could be added to this project with a disclaimer that this is an experimental feature.
That's a good point. I have no extra knowledge of it's future adoption than what is readily available via searching. I understand if you don't wish to add draft features to your library.
Then I'll propose to add SameSite
support as an experimental feature to this library, by which I mean:
SameSite
doesn't gain popularity,SameSite
does gain popularity it will be made a permanent feature of this library once the spec gets promoted to standards track.Is this OK?
That sounds reasonable. Thanks for looking into it.
I've added support for SameSite. To enable SameSite the samesite
option needs to be set to desired enforcement mode (i.e. "Strict" or "Lax").
Name | Type | Default | Description |
---|---|---|---|
samesite |
String |
"" |
The samesite argument may be used to prevent cookies from being sent along with cross-site requests.
|
That looks great!
Nice work @voltace :) See also: http://caniuse.com/#feat=same-site-cookie-attribute. Let's hope for wider browser support soon to upgrade it's status from experimental ;).
Firefox is currently considering: https://bugzilla.mozilla.org/show_bug.cgi?id=1351663
It would be great to have support for the SameSite option.
https://www.owasp.org/index.php/SameSite
https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-4.1