-
Notifications
You must be signed in to change notification settings - Fork 16
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
Apply an Origin Policy to *request* #12
Comments
I apologize for my ignorance here. Where does the server advertise the origin policy? My searches keep routing my to CORS information which, unless I'm missing something, isn't what you're talking about her. |
@grigs https://wicg.github.io/origin-policy/#origin-policy-well-known @igrigorik - huge +1 for the use-case. IIUC, that's already enabled by current spec. |
I don't believe that it is, because current processing policy only applies the origin policy on the response; policy doesn't affect browser behavior on the request.. which is what we're asking for here. |
It does for CORS preflights, no? |
Ah, hmm.. that's true. I guess we could similarly define a custom member (ala |
It's true that current processing won't apply to navigation requests, and it would be nice for the purpose of opt-ins if we could "pretend" the policy headers were received before sending navigation requests.
|
I don't think that's the case; there is no directive that controls "navigations" today.. Such a thing has been discussed before, but AFAIK, we don't have anything concrete. Re, HSTS: that's a great example of why what we're discussing here would be useful. If this mechanism existed, I don't think HSTS would need to invent own "remember this policy" mechanism. Ditto for Client-Hints and any other feature that wants to affect the request before it hits the wire. |
MegaCorp, Inc. wishes to ensure that an opt-in feature is enabled for each of the pages on https://example.com, while avoid the overhead associated with large response headers, and ensuring that the navigation request is subject to opt-in as well.
For example, example.com wants to enable Client-Hints for all requests on its origin. They can achieve this by specifying a policy that enables Client-Hints for supporting browsers:
Once such a policy is active, the client should apply the opt-in policy to every request and, following the example above, enable Client-Hints advertisements on all outbound requests to example.com.
This same pattern can be used for any opt-in feature; it'll remove the need for browsers to develop custom "remember this opt-in" policy mechanism.
WDYT?
p.s. more color here for how/why this would be valuable for Client Hints specifically.
The text was updated successfully, but these errors were encountered: