Send X-Content-Type-Options nosniff on Netlify
Why it matters
Without it, browsers may guess a file's type from its content, so an uploaded file that looks like a script or page can be run as one. The header makes them trust the declared Content-Type.
The fix
- Add the lines to _headers in the publish directory (or [[headers]] in netlify.toml) and redeploy. Functions and proxied responses must send it themselves.
_headers
/* X-Content-Type-Options: nosniff
Related
Scan your domain to see whether this applies to you.