You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The standard forbids using * in the Access-Control-Allow-Origin, Access-Control-Expose-Headers, Access-Control-Allow-Methods, or Access-Control-Allow-Headers response header, if the Access-Control-Allow-Credentials request header is set to true.
That's not entirely true... it's only not allowed if the request's credentials mode is "include". The credentials option in this library determines whether to set the response header.
In any case, where this gets tricky is that we cannot know in all cases what the credentials mode/intent is. For example, if cookies are sent, those cookies are not necessarily credentials. We would not want to break users just based on the presence of arbitrary cookies alone.
It's also probably not prudent for the framework itself to be checking client certificates in order to determine header content.
It might be safe to check authorization headers. e.g. if auth header(s) are present, then do something different. (FWIW, I haven't actually looked into what the current behavior is in this scenario.)
The standard forbids using
*
in theAccess-Control-Allow-Origin
,Access-Control-Expose-Headers
,Access-Control-Allow-Methods
, orAccess-Control-Allow-Headers
response header, if theAccess-Control-Allow-Credentials
request header is set totrue
.https://fetch.spec.whatwg.org/#cors-protocol-and-credentials
https://fetch.spec.whatwg.org/#http-new-header-syntax
Right now, this module allows it. In fact, it does it by default if the
credentials
option is set totrue
.Instead, it could either:
Origin
request header, if specified. TheVary: Origin
response header would need to be set too then.The text was updated successfully, but these errors were encountered: