| Summary: | Unable to render cross-origin image tag when added through fetch and javascript | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Marcos G. <marcosdg3> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | annevk, ap, cdumez, karlcow, marcosdg3, webkit-bug-importer, youennf, zalan |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar, NeedsReduction |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=271377 | ||
|
Description
Marcos G.
2022-11-08 11:13:07 PST
AFAICT the image should be allowed to load - the document has `Cross-Origin-Embedder-Policy: require-corp`, but the image has `Access-Control-Allow-Origin: https://standout.com`. > * Resizing the page sometimes renders the image it blocked earlier Yes, relayout makes it show up. Cmd+ is a good way to see this too. This makes me wonder if have two unrelated bugs: 1. COEP produces a misleading error, even though it doesn't actually prevent loading. 2. A layout bug that makes the image not appear until relayout. Thanks for your comment Alexey, created a temp fix by forcing a relayout. Yeah this is weird. The crossorigin attribute makes this a request whose mode is "cors" at which point CORP (or COEP) doesn't apply. Those only impact "no-cors" and to a limited extent "navigate". And since per ap's comment CORS is in order the network layer shouldn't complain about anything here. |