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

Use structured fields for CORS headers #1216

Open
letitz opened this issue Apr 14, 2021 · 2 comments
Open

Use structured fields for CORS headers #1216

letitz opened this issue Apr 14, 2021 · 2 comments

Comments

@letitz
Copy link

letitz commented Apr 14, 2021

Private Network Access is considering using structured fields for the new Access-Control-Allow-Private-Network header in WICG/private-network-access#45. This header should be kept consistent with the existing Access-Control-Allow-Credentials header defined by the CORS protocol, since they both accept a single value: "true".

It would be nice to modernize the existing ABNF-defined CORS header syntax to use structured fields instead.

To avoid backwards-incompatibility, the Allow-Credentials header in particular should probably be defined as a token instead of a boolean, which is unfortunate but surmountable.

It is less clear what to do with the Access-Control-{Request,Allow}-{Method,Headers} headers. Their syntax might be subtly different from that expected by structured fields' "list of tokens" type?

@annevk
Copy link
Member

annevk commented Apr 14, 2021

(Slightly related: #814.)

@annevk
Copy link
Member

annevk commented Dec 2, 2021

To be clear, unless they are fully compatible I don't think it's worth making changes here. It does seem fine to upgrade some (that are compatible) and not others (that are not).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants