-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Consider asserting a Cross-Origin-Resource-Policy
?
#18201
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
Comments
Hi, thanks for the heads-up. Since we already serve
|
Hi! Thanks for taking a look!
You could determine how many folks are making CORS-enabled requests by taking a look at incoming HTTP Archive shows* ~243k hosts making *Query:
|
Thanks for the clarification. We'll add this in the near future. |
Great to hear, thank you! FYI: BootstrapCDN rolled this out last week (jsdelivr/bootstrapcdn#1495). Thus far, nothing's exploded. :) |
…45476dac5551fef0a96ac357369d31fa196c4596545
…ee526c128693fecd8443452a7b3200fedde1a72fc0b2f149cb73a
Friendly ping. I'd also point to https://resourcepolicy.fyi/ as hopefully helpful context. :) |
@mikewest we'll get to this in 2 - 3 months, as I understand, it isn't necessary right away. |
The header is now being sent by our origin servers: https://cdn.jsdelivr.net/npm/jquery. We didn't purge all the caches around the world, so it'll propagate over time (or we'll purge later to update everything immediately if needed). |
The 307 is an "internal" response issued by Chrome, we can't change anything about it. If it causes an issue with CORP, I suppose you'll have to use HTTPS explicitly (as you should anyway) to avoid the redirect. |
It's worth filing a bug against Chromium here (https://crbug.com/new). You ought to be loading the |
@MartinKolarik, offcourse on production I use @mikewest, I will. I had my doubts about the behavior of Chrome after I noticed that Firefox handles it differently. Thanks for the replies! |
@kweij the issue is related only to requests that you make to jsDelivr (or other third parties). You can load your own content via HTTP locally, if you explicitly use HTTPS just for jsDelivr, you should be fine. |
@MartinKolarik, yes, your are right - this has nothing to do with my local environment. I was confused only because the resources are loaded using the protocol-less URL ("//cdn.jsdelivr.net/..."). |
@mikewest, good call on the Chrome bug. I've reported it and it's fixed already: https://bugs.chromium.org/p/chromium/issues/detail?id=1287500 |
Hey folks! Hopefully this is a reasonable repository for requests like this one. :)
Cross-Origin-Resource-Policy
(CORP) is an HTTP response header that asserts a scope in which a given resource is allowed to be embedded. Today, the default for all resources is to allow cross-site loads, which unfortunately creates the conditions for side-channel attacks via Spectre, et al. With this background, browser vendors are interested in changing this default generally in the long-term, and in the short-term will allow developers to require explicit opt-in viaCross-Origin-Embedder-Policy
. This opt-in will be a prerequisite for some particularly interesting APIs likeSharedArrayBuffer
.To support this migration, it would be ideal if y'all could begin adding this assertion explicitly to resources that are expected to be used by various sites out there on the internet (e.g. by sending a
Cross-Origin-Resource-Policy: cross-origin
header). This should be a no-op in the status quo, and will ensure that y'all aren't blocking developers from opting-intoCross-Origin-Embedder-Policy
(and therefore exciting new APIs).If there's any more context I can give you about this set of features, I'd be happy to chat!
The text was updated successfully, but these errors were encountered: