StackPractices
intermediate By Mathias Paulenko

Complete Guide to Web Security Headers

Implement CSP, HSTS, X-Frame-Options, and secure headers. Covers content security policy, CORS, referrer policy, permissions policy, cross-origin isolation, and testing with security scanners.

Introduction

HTTP security headers are response metadata that tell the browser how to handle your site’s content: which scripts may run, who may embed the page, how much referrer information leaks to third parties, and whether plain HTTP is ever acceptable. They’re the cheapest layer of defense you can deploy: one line of server config can neutralize entire attack classes like clickjacking or downgrade attacks.

This guide covers the headers that matter, the attack each one mitigates, how to configure them on Nginx, Apache, and Express, and how to roll them out without breaking production. The goal is a defensible baseline you can copy today, plus enough understanding to tighten it over time.

What Security Headers Actually Do

Every response your server sends can carry policy instructions. The browser reads them before it renders anything and enforces them even against your own markup. That’s the point: if an attacker manages to inject a <script> tag through a comment field, a strict Content-Security-Policy still stops it from executing, because the browser checks the declared policy, not anyone’s intentions.

Headers don’t fix vulnerable code; a CSP won’t patch the injection that let the <script> in. What they do is raise the cost of exploitation and contain the blast radius when something else fails. Think of them as the airbag, not the brakes.

They also do a quieter job: controlling information leakage. Referrer-Policy decides how much of the current URL third parties see, and Permissions-Policy decides which device APIs the page — and every third-party script inside it — may touch.

Content-Security-Policy (CSP)

CSP is the most capable header in the list, and the easiest to get wrong. It declares which origins may supply each resource type: scripts, styles, images, fonts, frames, XHR and WebSocket targets. A browser that honors the policy refuses to load or execute anything outside it, which is exactly what you want when attacker-controlled markup reaches the page.

A baseline policy

Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; object-src 'none'

Reading it: default-src 'self' means that unless a more specific directive says otherwise, only same-origin resources load. frame-ancestors 'none' is the clickjacking defense: nobody may iframe this page. object-src 'none' kills plugin embeds; Flash is long gone, but the directive still guards legacy PDF and applet paths. base-uri 'self' stops an injected <base> tag from rewriting every relative URL on the page, and form-action 'self' confines where forms may submit.

Two exceptions creep into most real sites: data: in img-src for inline images and icons, and a CDN or API origin in script-src or connect-src. Add them deliberately. Every extra origin is a hole an attacker can also use if that origin ever serves user-supplied content; https: as a blanket source, or a public CDN that hosts attacker-uploadable files, weakens the policy for everyone.

Inline scripts: nonces, hashes, and strict-dynamic

A baseline 'self' policy blocks every inline <script> on the page, including yours. There are three standard ways to allow specific inline scripts without reopening the unsafe-inline door.

Nonces (recommended for dynamic pages). The server generates a random value per request, stamps it on the scripts it intends to allow, and echoes it in the header:

<!-- The server generates a fresh random nonce on every request -->
<script nonce="4f2c9a1e">
  console.log("allowed");
</script>
Content-Security-Policy: script-src 'self' 'nonce-4f2c9a1e'

The nonce must be cryptographically random and different on every response. A static or guessable nonce is the same as no nonce: an injected script can just reuse it. Server-rendered frameworks (Next.js, Nuxt, Rails, Laravel) expose per-request nonces directly; on a purely static site, hashes are the practical route.

Hashes (for static inline scripts). You hash the exact script body and whitelist the digest:

# Generate a SHA-256 hash of the script contents
echo -n "console.log('hello');" | openssl dgst -sha256 -binary | openssl base64 -A
Content-Security-Policy: script-src 'self' 'sha256-abc123='

Replace abc123= with the real base64 digest. Hashes are brittle by design: change one character in the script, including whitespace, and the policy rejects it. Reserve them for bootstrap snippets that never change.

strict-dynamic (for modern bundlers). It tells the browser that a script which entered the page through a nonce or hash may be trusted to load further scripts, without listing every chunk URL:

Content-Security-Policy: script-src 'nonce-4f2c9a1e' 'strict-dynamic'; object-src 'none'

This is the pattern bundlers with code splitting actually need, and it’s supported everywhere CSP Level 3 is (Chrome 52+, Firefox 52+, Safari 15.4+). For the full treatment of directive interactions, nonce propagation, and per-framework setup, see Content Security Policy: CSP Headers, Nonces, Hashes.

A note on unsafe-hashes

unsafe-hashes exists for one narrow case: allowing inline event handler attributes (onclick="...") and style="..." attributes by hash. It doesn’t do what its name suggests for <script> and <style> elements, and it shows up constantly in copied policies where it’s not needed. Unless you can name the attribute it covers, leave it out.

Report-only mode and violation reports

Never enforce a new CSP blind. Content-Security-Policy-Report-Only evaluates the policy, reports every violation, and blocks nothing:

Content-Security-Policy-Report-Only: default-src 'self'; report-uri /csp-report

report-uri still works broadly but is deprecated. The Reporting API is the current mechanism: you declare a named endpoint group and point the CSP at it.

Reporting-Endpoints: csp="https://reports.example.com/csp"
Content-Security-Policy: default-src 'self'; report-to csp

With report-to, the browser batches violations and POSTs them as application/reports+json; with report-uri, it POSTs single reports as application/csp-report. Sending both is the pragmatic choice during migration: browsers that understand report-to use it, the rest fall back. A collection endpoint looks like this:

// Modern Reporting API payload (report-to)
app.post("/csp", express.json({ type: "application/reports+json" }), (req, res) => {
  for (const report of req.body) {
    console.log("CSP violation:", report.body);
  }
  res.status(204).end();
});

// Legacy format (report-uri)
app.post("/csp-report", express.json({ type: "application/csp-report" }), (req, res) => {
  console.log("CSP violation:", req.body["csp-report"]);
  res.status(204).end();
});

CSP directives reference

DirectiveControls
default-srcFallback for all resource types
script-srcJavaScript sources
style-srcCSS sources
img-srcImage sources
font-srcFont sources
connect-srcXHR, fetch, WebSocket, EventSource
frame-srciframe sources
frame-ancestorsWho can embed this page (anti-clickjacking)
object-srcFlash, Java, PDF embeds
media-srcAudio and video sources
manifest-srcWeb app manifest
worker-srcWeb Workers
base-uri<base> element restriction
form-actionForm submission targets
upgrade-insecure-requestsAuto-upgrade HTTP to HTTPS
report-uriLegacy violation report endpoint (deprecated)
report-toReporting API endpoint group

When CSP goes wrong

The classic failure is enforcing a policy copied from a blog post: analytics stops loading, fonts break, payment iframes vanish, and you find out through support tickets. The fix is procedural, not technical: run report-only first, let it soak, fix every legitimate violation by adding the source or removing the dependency, then enforce. The deployment section below has the full sequence.

The second classic is JSON embedding. Apps that serialize server data into an inline <script> tag (window.__DATA__ = {...}) break under strict script-src; the pattern survives only behind a nonce, and it’s usually cleaner to fetch the data over connect-src instead.

Strict-Transport-Security (HSTS)

HTTPS blocks man-in-the-middle attacks, but the very first HTTP request is still unprotected. An attacker on the network can intercept it, strip the redirect, and keep the victim talking plain HTTP (the SSL-stripping attack). HSTS closes that gap: once a browser sees the header, it refuses every HTTP request to that domain until max-age expires.

Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
  • max-age=31536000: one year, in seconds. Browsers restart the clock on every HTTPS visit, so active users never fall off.
  • includeSubDomains: the policy covers every subdomain. Don’t enable this until you’re sure all subdomains serve HTTPS; a forgotten dev.example.com on plain HTTP becomes unreachable for a year.
  • preload: a request for inclusion in the browser’s built-in preload list.

HSTS is trust-on-first-use by design: nothing protects the first visit before the browser has seen the header. The preload list exists to fix that: domains are shipped inside the browser binary itself. Submit yours at hstspreload.org. Requirements:

  • A valid HTTPS certificate on the apex domain and all subdomains
  • An HTTP-to-HTTPS redirect on the same host
  • max-age >= 31536000, includeSubDomains, and preload in the header

Treat preload as permanent in practice. Removal requests take months to propagate through browser release cycles, and during that time every affected subdomain must keep serving valid HTTPS or break outright. If any subdomain might ever need plain HTTP (old internal tooling is the usual suspect), skip preload.

X-Frame-Options

Clickjacking loads your page in a transparent iframe and overlays it on a decoy, so the user’s clicks land on buttons they can’t see (“confirm transfer” hidden under “claim your prize.” X-Frame-Options controls who may embed the page:

X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN

DENY blocks all framing, including your own pages; SAMEORIGIN allows same-origin iframes only. There was a third value, ALLOW-FROM, but it was removed from the spec and no current browser honors it. For per-origin embedding rules, use CSP frame-ancestors 'self' https://partner.example instead, which accepts a source list and wildcards.

Keep X-Frame-Options set alongside frame-ancestors: browsers that understand CSP use the directive, and older ones fall back to the header. The two never conflict; CSP wins when both are present.

X-Content-Type-Options

Browsers used to second-guess the Content-Type header: serve a file as text/plain and, if it looked like HTML, some browsers rendered it anyway. That’s an attack vector: let users upload a plain-text file that contains markup, get it sniffed as HTML, and you’ve stored XSS without any injection in your templates.

X-Content-Type-Options: nosniff

With nosniff, the browser respects the declared type: a script served as anything but JavaScript doesn’t execute, a stylesheet not labeled text/css doesn’t apply. nosniff is the only valid value; anything else does nothing.

The header costs nothing and occasionally exposes real bugs: a server that mislabels .js files as text/plain will break loudly under nosniff instead of quietly working. Most teams treat that as a feature: it surfaces broken MIME configuration before an attacker does.

Referrer-Policy

Every request the page makes, and every link the user clicks, can carry the current URL in the Referer header. That URL may contain session tokens, search queries, user IDs, or internal paths you would rather not hand to a CDN, an analytics vendor, or the site a link points to.

Referrer-Policy: strict-origin-when-cross-origin
ValueReferrer sent
no-referrerNone
no-referrer-when-downgradeFull URL on HTTPS→HTTPS, nothing on HTTPS→HTTP
same-originFull URL only for same-origin requests
originOrigin only (no path)
strict-originOrigin only, nothing on downgrade
origin-when-cross-originFull URL same-origin, origin only cross-origin
strict-origin-when-cross-originFull URL same-origin, origin only cross-origin, nothing on downgrade
unsafe-urlFull URL always (not recommended)

strict-origin-when-cross-origin is the right default for almost every site: same-origin requests keep the full URL so your own analytics and routing work, cross-origin requests get only the origin, and requests downgrading to HTTP get nothing. It’s also the default in modern browsers; sending it explicitly keeps the guarantee regardless of browser default changes.

If the app relies on referrer inspection (OAuth return flows, affiliate tracking, payment callbacks), test those paths before tightening further. no-referrer and strict-origin break integrations that expect a full referrer.

Permissions-Policy

The browser exposes dozens of device and platform APIs (camera, microphone, geolocation, USB, accelerometer). Permissions-Policy declares which of them the page and its embedded iframes may use, and it was formerly called Feature-Policy, so you will still see that name in older configs.

Permissions-Policy: camera=(), microphone=(), geolocation=(self), payment=(self "https://payments.example.com")

() denies the feature to everyone, (self) allows this origin only, and a list of origins grants specific embeds. The empty-deny form is the one that pays for itself: a third-party marketing tag can’t turn on the microphone when the header says microphone=(), no matter what the script tries.

A restrictive baseline for a typical content site:

Permissions-Policy: accelerometer=(), autoplay=(), camera=(), display-capture=(), encrypted-media=(), fullscreen=(self), geolocation=(), gyroscope=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), web-share=()

Grant features deliberately, per origin, and pair the header with the iframe allow attribute when a trusted embed needs one; the header sets the ceiling, allow delegates within it.

Cross-Origin Resource Sharing (CORS)

CORS is a different animal from the rest of this guide. Every other header here tightens what the page may do; CORS relaxes the Same-Origin Policy to let other origins read your responses. A misconfigured CORS policy doesn’t break your site; it hands your API’s data to whoever asks.

Simple requests

For plain GET/POST requests without custom headers, the browser sends the request with an Origin header and checks the response:

Access-Control-Allow-Origin: https://example.com
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Max-Age: 86400

If Access-Control-Allow-Origin doesn’t match the requesting origin, the browser blocks the response: the request already went through, so CORS is never a substitute for authentication or rate limiting.

Credentials and the wildcard rule

Cookies and authorization headers only travel cross-origin when the page asks for credentials and the server opts in:

Access-Control-Allow-Origin: https://example.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Content-Type, Authorization

The spec forbids Access-Control-Allow-Origin: * together with Access-Control-Allow-Credentials: true: browsers reject the combination outright. You must echo the exact origin, which means the allowlist lives in code, not in the header value.

Preflight requests

Requests with custom headers, Authorization, JSON bodies, or methods beyond GET/POST/HEAD trigger a preflight: the browser sends an OPTIONS request first and only proceeds if the response allows it.

# Response to the OPTIONS preflight
Access-Control-Allow-Origin: https://example.com
Access-Control-Allow-Methods: GET, POST, PUT, DELETE
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Max-Age: 86400

Access-Control-Max-Age caches the preflight result, so the browser doesn’t repeat OPTIONS on every call; 86400 is the common ceiling browsers cap it at.

One operational detail that bites in production: when the allowed origin is dynamic, add Vary: Origin to the response. Without it, shared caches can serve a response stamped for one origin to requests from another, and CORS errors appear and disappear depending on cache state.

The deep-dive (token pitfalls, origin reflection attacks, framework config) lives in CORS Security: Origins, Headers, Preflight, Credentials. For per-endpoint API header patterns, see the API security headers recipe.

Cross-Origin Isolation (COOP, COEP, CORP)

These three headers work together to isolate your page’s browsing context from other origins. They exist because of Spectre-class side-channel attacks: a malicious page sharing a process or opener relationship with yours could, in principle, read data it shouldn’t. Browsers gate powerful features (SharedArrayBuffer, high-resolution timers) behind a crossOriginIsolated flag that you only get by deploying all three.

COOP (Cross-Origin-Opener-Policy)

Cross-Origin-Opener-Policy: same-origin

COOP severs the window.opener relationship between your page and cross-origin windows. If your site opens (or is opened by) a page on another origin, the two end up in separate browsing context groups and separate processes, so neither can script the other. If the app uses popup-based OAuth or payment flows, same-origin-allow-popups keeps popups able to postMessage back while still isolating the rest.

COEP (Cross-Origin-Embedder-Policy)

Cross-Origin-Embedder-Policy: require-corp

COEP flips the direction: it requires every resource the page loads (images, scripts, iframes) to explicitly opt in to being embedded cross-origin via CORP or CORS. That’s also its cost: third-party embeds that don’t send Cross-Origin-Resource-Policy or a matching Access-Control-Allow-Origin simply stop loading. credentialless is the gentler variant: cross-origin no-credential resources load without CORP, and it covers most analytics and static-asset embeds.

CORP (Cross-Origin-Resource-Policy)

Cross-Origin-Resource-Policy: same-origin

CORP is the resource-side counterpart, set on the responses you serve. same-origin restricts the resource to your origin, same-site allows sibling subdomains, and cross-origin declares it embeddable anywhere, the right choice for public CDN assets and a way for your resources to satisfy a partner site’s COEP.

Deploy COOP first (it rarely breaks anything), then CORP on your own assets, and enable COEP only after auditing every third-party embed; require-corp with an unprepared embed is a fast route to blank widgets.

Server Configuration

Headers belong at the edge as much as at the app. If a CDN or load balancer sits in front, it can inject headers for every response, including error pages the app never sees. Wherever you set them, make sure they land on all responses: in Nginx and Apache that means always, which keeps headers on 4xx and 5xx responses too. Attackers love error pages; security headers should be there to meet them.

Nginx

server {
    listen 443 ssl http2;
    server_name example.com;

    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
    add_header X-Frame-Options "DENY" always;
    add_header X-Content-Type-Options "nosniff" always;
    add_header Referrer-Policy "strict-origin-when-cross-origin" always;
    add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
    add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; object-src 'none'" always;
}

One Nginx quirk: add_header inside a location block replaces, rather than merges with, add_header directives at the server level; the inherited headers silently disappear from that location. Keep them all at one level or repeat the full set.

Apache

<IfModule mod_headers.c>
    Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
    Header always set X-Frame-Options "DENY"
    Header always set X-Content-Type-Options "nosniff"
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
    Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
    Header always set Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; object-src 'none'"
</IfModule>

Express.js

Don’t set security headers one by one: Helmet ships sane defaults and is the standard for Node apps. The full walkthrough is in the Node.js Helmet security headers recipe; the CSP-focused config looks like this:

const helmet = require("helmet");

app.use(helmet({
  contentSecurityPolicy: {
    directives: {
      defaultSrc: ["'self'"],
      scriptSrc: ["'self'", "https://cdn.jsdelivr.net"],
      styleSrc: ["'self'", "https://fonts.googleapis.com"],
      fontSrc: ["'self'", "https://fonts.gstatic.com"],
      imgSrc: ["'self'", "data:", "https:"],
      connectSrc: ["'self'", "https://api.example.com"],
      frameAncestors: ["'none'"],
      baseUri: ["'self'"],
      formAction: ["'self'"],
      objectSrc: ["'none'"],
    },
  },
  strictTransportSecurity: {
    maxAge: 31536000,
    includeSubDomains: true,
    preload: true,
  },
}));

Helmet’s defaults are deliberately conservative (X-Frame-Options, nosniff, and a strict referrer policy come on by default), and CSP itself is opt-in because only you know which origins the app legitimately needs.

Deployment Strategy

Rolling out security headers all at once is how sites break. Roll them out by risk: the zero-risk headers first, then CSP through report-only, then the cross-origin isolation set when you actually need it.

Mermaid flowchart LR diagram
  1. Baseline set: X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy. None of these can break a well-behaved page; deploy them everywhere on day one.
  2. HSTS: only after confirming every subdomain serves HTTPS. Start with a short max-age (300 seconds), raise it over days, then add includeSubDomains and consider preload.
  3. CSP report-only: let violations accumulate for a week or two across real traffic. Triage each one: add the legitimate source, or remove the inline script it caught.
  4. CSP enforce: flip the same policy to Content-Security-Policy and keep the report endpoint live. Violations keep arriving long after enforcement; monitor them.
  5. Cross-origin isolation: deploy COOP and CORP broadly; enable COEP only when you need crossOriginIsolated or have audited every embed.

Testing

Online scanners

Command line

curl -sI https://example.com | grep -iE "strict-transport|content-security|x-frame|x-content|referrer|permissions"

Browser DevTools

Chrome DevTools’ Security tab shows the TLS connection and flags insecure content; the Network tab exposes every response header per request. For CSP specifically, the Console logs each violation with the blocked URL and the directive that rejected it, the first place to look when something disappears from the page.

CSP violation reporting

The report endpoints from the CSP section (report-uri and report-to) are also your production monitoring: a sudden spike in blocked script-src violations usually means a new third-party script shipped, not an attack, but you only know that if someone is reading the reports.

Best Practices

  • Start with CSP report-only: collect violations from real traffic before enforcing anything
  • Use nonces over hashes for dynamic content: hashes break on any change; nonces follow the request
  • Set frame-ancestors 'none': the strongest clickjacking protection; tighten only if a legit embed needs it
  • Include object-src 'none': plugin embeds are dead, keep the hole closed
  • Use strict-origin-when-cross-origin: the privacy-safe referrer default that keeps internal analytics working
  • Ramp HSTS gradually: short max-age first, includeSubDomains only when every subdomain is on HTTPS, preload last
  • Send headers on error responses too: use always in Nginx and Apache; 4xx and 5xx pages are still attack surface
  • Disable unused features in Permissions-Policy: every () deny is an API a third-party script can’t touch
  • Use Helmet for Node.js: reviewed defaults instead of hand-rolled headers
  • Review CSP monthly: new third-party scripts arrive silently and break under strict policies
  • Scope CORS per route: a global Access-Control-Allow-Origin is almost never what an app needs
  • Read your violation reports: unmonitored reporting is just latency

Common Mistakes

  • Using unsafe-inline in CSP: it permits exactly what CSP exists to stop; every bypass technique starts there
  • Access-Control-Allow-Origin: * with credentials: browsers reject it, and debugging it wastes hours; echo the origin instead
  • Missing always in Nginx/Apache: error pages ship without security headers
  • Enabling HSTS preload too early: a subdomain that later needs HTTP becomes unreachable for months
  • Using X-Frame-Options: ALLOW-FROM: removed from the spec; modern browsers ignore it
  • Enforcing CSP without a report-only phase: production pages break silently, one third-party embed at a time
  • Forgetting object-src: default-src doesn’t cover plugin embeds in every browser; set object-src 'none' explicitly
  • Skipping headers on API responses: nosniff, restrictive CORS, and a no-cache posture apply to JSON endpoints too
  • Allowing unsafe-eval: a few dev-time frameworks require it; it should never survive to production
  • Enabling COEP require-corp without auditing embeds: third-party iframes and images without CORP stop loading instantly

See Also

Frequently Asked Questions

Which security headers should I set first?

Start with the zero-risk set: X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN (or DENY), Referrer-Policy: strict-origin-when-cross-origin, and a restrictive Permissions-Policy. None of them can break a well-behaved page. Then add HSTS after verifying HTTPS everywhere, and CSP last via report-only; it's the only one that can take the site down if you rush it.

What is the difference between CSP frame-ancestors and X-Frame-Options?

frame-ancestors is the modern replacement: it accepts a list of origins and wildcards, while X-Frame-Options only understands DENY and SAMEORIGIN (ALLOW-FROM is dead). When both are present, browsers that support CSP use frame-ancestors and ignore the header. Deploy both: the header covers the browsers that predate CSP.

Do APIs need security headers too?

Yes, selectively. JSON APIs benefit from nosniff (prevents content-type confusion), correctly scoped CORS, and Cache-Control: no-store for sensitive payloads. CSP and frame-ancestors matter less for pure API responses but are still cheap insurance: the same API sometimes serves HTML errors or user-uploaded files.

How do I debug CSP violations?

The browser console logs every violation with the blocked URL and the directive that rejected it; start there. In production, keep report-uri or report-to live so violations aggregate at your endpoint, and run new policies in report-only first so nothing breaks while you collect data.

Should I use a nonce or a hash in CSP?

Nonce for dynamic pages, hash for static ones. A nonce is generated per request, so it suits server-rendered HTML; a hash is computed once over exact content, so it suits scripts that never change, like a boot snippet in a static site. If you find yourself maintaining a long hash list, that's the signal to switch to nonces.

Should I use strict-dynamic in CSP?

Use it when a trusted bootstrap script loads other scripts, the standard case for bundlers with code splitting. strict-dynamic lets a nonce-approved script pull in anything it needs, so you stop maintaining an allowlist of chunk URLs. It requires CSP Level 3 (Chrome 52+, Firefox 52+, Safari 15.4+), which covers all current browsers.

What breaks when I enable Cross-Origin-Embedder-Policy: require-corp?

Every cross-origin resource that doesn't explicitly opt in (via CORP on their side or a CORS Access-Control-Allow-Origin) stops loading. Embedded videos, third-party iframes, ad scripts, and externally hosted images are the usual casualties. Audit embeds first, or use credentialless as the intermediate step.