Security headers
Permissions-Policy lets you switch off browser features, such as the camera, microphone or geolocation, for your pages and any third-party content embedded in them.
Not sure whether your site has this problem? Check it in seconds.
If a compromised script or a third-party embed tries to use a sensitive feature, the policy can stop it. It's about limiting what embedded content can do, not a fix for vulnerabilities by itself.
Look for Permissions-Policy in the response headers. It replaces the older Feature-Policy header.
Header value
Permissions-Policy: camera=(), microphone=(), geolocation=()Nginx
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;Apache
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"Next.js (next.config.ts)
const nextConfig = {
async headers() {
return [
{
source: "/:path*",
headers: [{ key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()" }],
},
];
},
};
export default nextConfig;No. It only changes what browser features pages may use.
Guidance is general. Test header and DNS changes on a staging copy first, and check your hosting provider's documentation for platform-specific steps.