The Security Headers Most Sites Still Forget
By toolbelt maintainers ·
Updated
Three headers prevent most of the cheap attacks. They take an afternoon to add and almost nobody has all of them.
What is this tool?
Security headers are instructions from the server about what a page may do. They are cheap and they stop whole categories of attack.
How it works
I parse the header block you paste and check each control against a standard, not just its presence. A CSP with unsafe-inline is reported as weak. HSTS under 180 days is reported as short. Framing protection counts if either X-Frame-Options or CSP frame-ancestors is set.
Example
content-security-policy: default-src 'self'; script-src 'self' 'unsafe-inline' strict-transport-security: max-age=63072000; includeSubDomains x-content-type-options: nosniff The first is present but weakened; the second and third pass.
When to use it
After configuring headers, to confirm they reached the real response rather than a development server. When reviewing a dependency you are about to trust. Before answering a security questionnaire.
Optimization Tips
Roll CSP out in report-only mode first. Enforcing a policy you have not tested will break something on the one page nobody checked. And set HSTS with a short max-age before a long one, because it is hard to walk back.
Frequently Asked Questions
Does this scan a live URL?
Why is unsafe-inline flagged?
Is X-Frame-Options still needed?
What about CORS?
Related tools
- curl ConverterConvert curl commands into Python, JavaScript, Go, PHP, Ruby, Rust and Java code. Paste a request copied from your browser devtools and get working client code instantly.
- JSONPath QueryQuery JSON with JSONPath expressions, including wildcards, recursive descent and simple filters. See exactly which nodes matched before you write the code.
- JSON ValidatorValidate JSON syntax with detailed error messages. Catch trailing commas, missing brackets, and syntax errors instantly before sending payloads to your API.
- JSON FormatterBeautify, validate, minify, and view JSON. Format messy API responses into readable code or compress it to save bandwidth, running safely in your browser.