WSWhat Scene?

Learn · Security & privacy

What are security headers, and which ones matter?

Security headers are instructions a server sends with every response telling the browser what to allow. The ones that earn their place are Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options, X-Frame-Options and Referrer-Policy. They cost nothing to send and remove whole classes of attack.

Content-Security-Policy is the powerful one and the fiddly one. It lists where scripts and styles may load from, which is what turns an injected script into a blocked request. Roll it out in report-only mode first and read the reports, because a policy applied blind will break something real.

They are defence in depth, not a fix. Headers reduce what a bug can do once you have one; they do not stop you having it. Check yours with a plain request rather than assuming, since a header that was never actually sent looks identical to one you meant to send.

Updated August 2026

Want this built, not just explained?