-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Added support for SameSite cookies. #409
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
Conversation
@anandology Please review & comment. |
@akash0x53 Did you notice my comment about string concatenation? |
Nope. I can guess comment should be about this |
Good to mitigate against CSRF attacks. `SameSite` cookies are mentioned in draft https://tools.ietf.org/html/draft-west-first-party-cookies-07
6508aca
to
61053e8
Compare
morsel["httponly"] = True | ||
value = morsel.OutputString() | ||
if samesite and samesite.lower() in ['strict', 'lax']: | ||
samesite_attr = "; SameSite=%s" % samesite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go? @anandology
SameSite support PR open for Django too. |
Any update on this PR? |
👍 Looks good to me, @akash0x53 maybe squash down to a single commit? |
Good to mitigate against CSRF attacks.
SameSite
cookies are mentionedin draft https://tools.ietf.org/html/draft-west-first-party-cookies-07
Fix for issue #410