Skip to content
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

Request: Add sameSite parameter to unset_cookie #2124

Closed
agulab opened this issue Nov 8, 2022 · 3 comments · Fixed by #2140
Closed

Request: Add sameSite parameter to unset_cookie #2124

agulab opened this issue Nov 8, 2022 · 3 comments · Fixed by #2140
Labels
enhancement good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks!
Milestone

Comments

@agulab
Copy link

agulab commented Nov 8, 2022

It would be appreciated if I could use the unset_cookie method to unset a cookie I created with the parameter sameSite='None'. Otherwise, I'm forced to use set_cookie for the sole purpose of unsetting that cookie...

With current behaviour, sameSite is set to 'Lax' by default and so the browser ignores it because I'm using different domains for front and backend, and so using Cross Site requests.

Thank you

@CaselIT
Copy link
Member

CaselIT commented Nov 10, 2022

Hi,

thanks for reporting. I agree that it makes sense. We can keep the default samesite to lax, but allow users to override it.

@vytas7 vytas7 added good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks! needs contributor Comment on this issue if you'd like to volunteer to work on this. Thanks! labels Nov 27, 2022
TigreModerata added a commit to TigreModerata/falcon that referenced this issue Jan 16, 2023
Tests: added a test case to test_unset_cookies and to on_get in CookieUnset
@TigreModerata
Copy link
Contributor

Hi, I just submitted a draft in a pull request.

@vytas7
Copy link
Member

vytas7 commented Jan 16, 2023

Awesome, thanks, we'll take a look!

@vytas7 vytas7 removed the needs contributor Comment on this issue if you'd like to volunteer to work on this. Thanks! label Jan 16, 2023
vytas7 added a commit that referenced this issue Jan 18, 2023
* Enhancement #2124: added the samesite parameter to unset_cookie.
Tests: added a test case to test_unset_cookies and to on_get in CookieUnset

* Added new option to documentation in cookies.srt

* Added tests, CookiesUnsetSameSite class and test_unset_cookies_samesite; added towncrier news fragment.

* Removed unused import logging from test_cookies

* Reverted changes to docs/changes4.0.0.rst

* Reverted changes to docs/changes4.0.0.rst

* Update 4.0.0.rst

Co-authored-by: Vytautas Liuolia <vytautas.liuolia@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants