DevToolsmith

Cross-Origin-Embedder-Policy Header

The Cross-Origin-Embedder-Policy response header requires every cross-origin resource a page loads to opt in to being embedded (COEP).

Type
Response header
Category
Security
Defined in
HTML Standard

Syntax

Cross-Origin-Embedder-Policy: unsafe-none  |  require-corp  |  credentialless

How Cross-Origin-Embedder-Policy works

With require-corp, the page can only load cross-origin images, scripts and frames that send CORS headers or Cross-Origin-Resource-Policy: cross-origin. Together with COOP same-origin, it makes the page cross-origin isolated, which unlocks SharedArrayBuffer (needed by multithreaded WebAssembly such as ffmpeg.wasm). credentialless is an easier mode: cross-origin requests are sent without cookies instead of being blocked.

Examples

Enable SharedArrayBuffer
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

Common mistakes

  • Check self.crossOriginIsolated in the console to confirm isolation is active.

Check it

curl -sI https://example.com | grep -i '^cross-origin-embedder-policy:'

Paste a full set of response headers into the HTTP header checker to get every header explained and common mistakes flagged.

Related headers

More security headers

Content-Security-Policy , Strict-Transport-Security , X-Content-Type-Options , X-Frame-Options , Referrer-Policy , Permissions-Policy .

Sources

Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.

Frequently asked questions

What does the Cross-Origin-Embedder-Policy header do?

The Cross-Origin-Embedder-Policy response header requires every cross-origin resource a page loads to opt in to being embedded (COEP). With require-corp, the page can only load cross-origin images, scripts and frames that send CORS headers or Cross-Origin-Resource-Policy: cross-origin. Together with COOP same-origin, it makes the page cross-origin isolated, which unlocks SharedArrayBuffer (needed by multithreaded WebAssembly such as ffmpeg.wasm). credentialless is an easier mode: cross-origin requests are sent without cookies instead of being blocked.

How do I see the Cross-Origin-Embedder-Policy header?

Run "curl -sI https://example.com" to print a response’s headers, or open the Network tab in your browser’s dev tools and select the request. Paste the headers into the HTTP header checker on this site to get each one explained.