-
Notifications
You must be signed in to change notification settings - Fork 331
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
CORS protocol and HTTP caches #402
Comments
No, it's saying that if you want to use different values for ACAO than * or a fixed origin, you need to use Vary. |
Thank you. Let If ( |
That is #307 I think, unless you mean that credentials mode is identical? If it is identical that would indeed be a problem of sorts with the server. |
I thought about the CORS mode (request's mode), not about the credentials mode. The issue was reported at https://bugs.chromium.org/p/chromium/issues/detail?id=658575. Though the example at Comment 5 uses different credentials mode (no cors + include vs. cors + same-origin), using the same credentials mode (no cors + include vs. cors + include) results in the same behavior. From https://bugzilla.mozilla.org/show_bug.cgi?id=1274555:
If #307 means specifying the "load context info", that will resolve this issue as well (My understanding is it isn't specified currently. Please correct me if I'm wrong). |
I will ask for some clarifications too:
If so, then it's what we call "anonymous" mode (or flag) on a request. To clarify "load context info": it's a set of flags and values that separate (identifies) the context where from the request is being made and separates cache entries in the http cache this way. Load context info is carrying the following information:
An entry in the http cache is identified by: [load context info][URL w/o hash] tuple. Re #402 (comment):
Yes, if there is nothing more said about the cachability of the response. Only solution is the server side as mentioned in https://bugs.chromium.org/p/chromium/issues/detail?id=658575#c5. What you suggest sounds like we may want to isolate the cache by a CORS flag (add it to the load context info). The result would be: let's have pages: foo.com/, bar.com/, baz.com/, all referring a resources at foo.com/script.js. In the http cache there would then be exactly two entries:
Tho, I believe this could well break the web. Hence there is the requirement (suggestion?) to use the 'Vary: origin' response header which can be managed by the web admins. OTOH, this puts the CORS protection on their shoulders. Maybe the browser should help here somehow? |
Yeah. So I think varying on that for the cache is still sufficient as only without that do you get an actual security issue. And recommending |
Thank you for the reply.
I meant the mode specified in the spec. Back to the original question, the conclusion is that we recommend |
@yutakahirano the original question is about a response setting the |
I see, then let's close this issue. |
FYI The exact use case explained in comment 3 describe the default Amazon AWS configuration. Ref:https://bugs.chromium.org/p/chromium/issues/detail?id=809891 |
There's another bug report: https://bugs.chromium.org/p/chromium/issues/detail?id=855713 |
The section says
Is it saying that we need a
Vary
header if we want to add "Access-Control-Allow-Origin: *" to a response only when anOrigin
header is present on the request?The text was updated successfully, but these errors were encountered: