-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Safari does not support localhost exception for Secure cookies
#28461
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
|
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
localhost exception for Secure cookies
caugner
left a comment
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.
Is this exception mentioned in the spec?
Co-authored-by: Claas Augner <495429+caugner@users.noreply.github.com>
|
Hi @caugner, Thanks so much for the review and the very helpful suggestion! I've just committed your change. You're spot on about the spec. It looks like the Appreciate the help! |
|
@Mattia-Rollo Just to double-check: Chrome and Safari apply this exception, and send Edit: Also, have you considered adding the note to the |
|
Hi @caugner, Thanks for the review! To answer your double-check: Yes, that is correct. Chrome and Firefox apply the exception (allowing Secure cookies on localhost), while Safari does not. This behavior is confirmed by the WebKit bug report I linked (#281149), which tracks this exact lack of support in Safari compared to other browsers. Regarding the location of the note: That is a great point. Since the documented behavior is the User Agent's (Safari) decision on whether to send the cookie, placing the note under the Cookie header is indeed more appropriate than Set-Cookie. I can move the note to http/headers/Cookie.json. Please confirm if you'd like me to delete the note from Set-Cookie.json entirely, or just move it. |
|
@Mattia-Rollo Thanks for confirming. Let's duplicate the note to |
|
Done! Duplicated the note to Cookie.json as requested. |
Hi @hamishwillee,
As per your request on mdn/content#41795, I'm opening this PR to add the note about Safari's
localhostexception forSecurecookies directly to the BCD.I've added the note to the main
Set-Cookiesupport block for Safari, asSecureisn't tracked as a separate sub-feature. Please let me know if this is the correct location!Summary
Adds a BCD note to the
Set-Cookieheader, clarifying that Safari does not support thelocalhostexception for theSecureattribute.Test results and supporting details
This is a data-only change to add a
note.Supporting information and related discussion:
mdn/contentPR (see below).Related issues
Fixes mdn/content#41366
Addresses discussion in mdn/content#41795