-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Ensuring deleted cookies are recognized by the browser by ensuring the MaxAge within CookieOptions is set to null. #55169
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
CI failure looks like network flakiness. Re-running. |
Thanks @amcasey, I have submitted the PR. |
…Age of cookieOptions is set to null upon deletion
Thanks for the review @amcasey, I believe the |
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.
Thanks!
Reset MaxAge to Null on Cookie Deletion
Summary:
This PR aims to ensure reliable cookie deletion by setting MaxAge to null in the CookieOptions used by ResponseCookies.Delete, addressing inconsistencies identified in issue #52159.
Description:
To resolve inconsistencies in cookie deletion across browsers, this update modifies the ResponseCookies.Delete method to reset MaxAge to null. Previously, retained MaxAge values could prevent browsers from recognizing that cookies were meant to be deleted.
Technical Changes:
Enforced MaxAge = null in CookieOptions during cookie deletion..
Fixes
#52159 by standardizing cookie deletion behavior across all browsers.