How to Configure Strict Cross-Origin Embedder Policy (COEP) in Google Chrome

Modern browser architectures enforce process isolation to prevent untrusted cross-origin assets from leaking sensitive data through side-channel timing attacks. Cross-Origin Embedder Policy (COEP) ensures that a document can only load external resources that explicitly grant permission to be embedded. In Google Chrome, pairing COEP with Cross-Origin Opener Policy (COOP) activates full cross-origin isolation, unlocking multi-threaded SharedArrayBuffer contexts and hardware-synchronised WebGPU memory buffers.

Understanding COEP Directives: require-corp vs credentialless

The Cross-Origin-Embedder-Policy HTTP response header supports two primary enforcement modes:

  • require-corp: The strictest standard. Requires every loaded subresource (such as images, scripts, stylesheets, and iframes) to provide a valid Cross-Origin-Resource-Policy (CORP) header or be served with CORS approval. If a third-party asset omits these headers, Chrome blocks it instantly.
  • credentialless: Introduced in Chromium to simplify deployment. Loads cross-origin resources without cookies, client certificates, or HTTP credentials, allowing assets to load without requiring remote servers to implement CORP headers.
  • unsafe-none: Default behaviour where subresources load without embedder restrictions.

Configuring Web Server COEP Headers

Configure your production web server to issue the required COEP and COOP headers:

# Nginx server block configuration
add_header Cross-Origin-Opener-Policy "same-origin" always;
add_header Cross-Origin-Embedder-Policy "require-corp" always;

# Apache HTTP Server (.htaccess / virtual host)
Header always set Cross-Origin-Opener-Policy "same-origin"
Header always set Cross-Origin-Embedder-Policy "require-corp"

Auditing Blocked Subresources in Chrome DevTools

When transitioning an existing web application to COEP, external subresources that lack explicit CORP headers fail to load:

  1. Open Google Chrome and navigate to the application.
  2. Open Chrome DevTools by pressing Ctrl + Shift + I (or Option + Command + I on macOS).
  3. Select the Console panel to view blocked network requests:
    GET https://cdn.example.com/widget.js net::ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep 200 (OK)
  4. Open the Issues tab in DevTools. Under the Cross-Origin Embedder Policy section, Chrome lists each violating asset alongside specific remediation instructions.
  5. Verify that your top-level window reports crossOriginIsolated === true in the JavaScript console.

Testing Deployments with Report-Only Headers

To identify incompatible third-party dependencies before enforcing strict blocking in production, deploy the report-only directive:

Cross-Origin-Embedder-Policy-Report-Only: require-corp; report-to="coep-endpoint"

Chrome evaluates all embedded resources against the policy and dispatches JSON violation reports to your telemetry collector without breaking user-facing multimedia or payment frames.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.