falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.51k stars 937 forks source link

feat: add sameSite parameter to unset_cookie #2140

Closed TigreModerata closed 1 year ago

TigreModerata commented 1 year ago

Summary of Changes

Added samesite parameter to unset_cookies, defaulting to 'Lax'. Tests: added a test case to test_unset_cookies and to on_get in CookieUnset Docs: added explanation of new parameter to cookies.rst

Related Issues

Fixes #2124

Pull Request Checklist

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

PR template inspired by the attrs project.

codecov[bot] commented 1 year ago

Codecov Report

Merging #2140 (c5a0b88) into master (16d4710) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #2140   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           62        62           
  Lines         6789      6789           
  Branches      1095      1095           
=========================================
  Hits          6789      6789           
Impacted Files Coverage Δ
falcon/response.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

TigreModerata commented 1 year ago

Excellent, thanks for the comments, I'll push an update asap!

TigreModerata commented 1 year ago

You need to revert docs/changes/4.0.0.rst -- we don't want to render that file yet, we'll probably do that at some time around the first beta release.

Done

CaselIT commented 1 year ago

Thanks! 👍 (I'll tweak the newsfragment later a bit because we have some others that require more cleanup anyway.)

should also add @TigreModerata to the contridutors

vytas7 commented 1 year ago

Yes, we run that script from time to time now, particularly before releases :slightly_smiling_face:

CaselIT commented 1 year ago

forgot we automated that!

TigreModerata commented 1 year ago

Thanks to all - I will try to contribute more in the future, when I know how :)

vytas7 commented 1 year ago

Thank you for contributing @TigreModerata! If you want to take one more issue, let us know :slightly_smiling_face: https://github.com/falconry/falcon/issues/1010 might be a good one for new contributors, but you can of course pick whatever you like.