Security headers
Cross-origin and feature headers
Permissions-Policy limits browser features like camera and location, and the cross-origin headers (COOP, COEP, CORP) and CORS control how other sites can use your page.
Why it matters
None of these is a vulnerability on its own. Permissions-Policy stops embedded third-party code from using features your site doesn't need, and the cross-origin headers add isolation. A CORS setting that allows credentialed reads is worth reviewing if the page shows private data.
What Scanetra looks for
- Which of Permissions-Policy, Cross-Origin-Opener-Policy, Cross-Origin-Embedder-Policy and Cross-Origin-Resource-Policy are sent.
- Access-Control-Allow-Origin: * on the homepage.
- Credentialed cross-site reads allowed for a named origin.
It reads only your homepage's public response. How a scan works
How to fix it
nginx
In the server block that serves HTTPS. The always flag also adds it to error pages.
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;Apache
Needs mod_headers. In the VirtualHost or .htaccess.
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"Cloudflare
Rules › Transform Rules › Modify Response Header: create a rule for all incoming requests that sets the static header Permissions-Policy to the value below.
camera=(), microphone=(), geolocation=()Vercel
In vercel.json at the root of the project.
{
"headers": [
{
"source": "/(.*)",
"headers": [{ "key": "Permissions-Policy", "value": "camera=(), microphone=(), geolocation=()" }]
}
]
}Netlify
In a file named _headers in the publish directory.
/*
Permissions-Policy: camera=(), microphone=(), geolocation=()Cross-Origin-Opener-Policy
Safe for most sites. It breaks pop-up sign-in flows that rely on window.opener, so test those.
Cross-Origin-Opener-Policy: same-originCORS
Only send Access-Control-Allow-Credentials: true for specific, trusted origins, and never reflect any Origin back unchecked.
Replace example.com with your own domain, and test changes on a staging copy first where you can.
Check that it worked
The response headers include the headers you chose. Then scan again.
Check your own site
A free scan tells you whether your site passes this check, and the 24 others.