-
Notifications
You must be signed in to change notification settings - Fork 341
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
Clarify the way CORB should be applied to beacons #882
Comments
Can you elaborate on what problem you are having? |
We have 2 domains -
Sure thing it needs fixing in Chrome/Chromium but at least CORB part is done by spec. |
This part of CORB (which would rely on sniffing) isn't specified yet, see whatwg/mimesniff#87. But even if it were, I don't think we'd disable it because of implementation issues as that would weaken security guarantees and could lead to security issues. So I suggest taking this up with Chromium directly. |
What about adding header ( |
That's what CORS is. |
Could you explain that please? What header(s) should I set to disable CORB? Here I see a reference to |
If you opt into CORS with |
That's exact;y why I created this issue - there's no way of controlling CORS/CORB on server for beacon, With |
In that case use |
AFAIK, But if your request headers is CORS friendly, then a preflight will not be made and |
That sounds like a browser bug. Please file it against the relevant browser if you continue to see that! I'm going to close this as there doesn't seem to be a problem with the Fetch Standard here. |
According to specification beacon request
mode
is determined byContent-Type
: if it's specified and value is CORS-safelisted - thenmode
should becors
, otherwise (default case) -no-cors
.CORB specification does not state if beacon requests should be blocked but mentions that it's a helping mechanism where CORS cannot be applied. This leads to idea that when beacon request
mode
is set tocors
request should not be blocked.So it means that response should be treated based on request data's type and that makes no sense for me. Moreover, that means server is not able to turn off CORB unless client sets correct
Content-Type
(and it shouldn't be CORS-safelisted).What about adding more controls or maybe disabling CORB for beacon requests at all (since the response cannot be used anyway)?
The text was updated successfully, but these errors were encountered: