Kavach

Fix · Express / Node

Fix “Referrer-Policy” on Express / Node

Add: Referrer-Policy: strict-origin-when-cross-origin

res.setHeader("Referrer-Policy", "strict-origin-when-cross-origin");

Verify the fix

Re-run the Referrer-Policy check after deploying. Test config changes in staging first and keep a rollback: a wrong header can break a site faster than a missing one.

Other stacks: nginx · Apache · Caddy · Cloudflare

Scan your site free → Monitor it continuously