OWASP security headers checker

The scanner crawls same-origin HTML pages, inspects every HTTP response against OWASP Secure Headers recommendations, checks cookie flags, and exports ready-to-paste server blocks.

HTTP headers inspected by the scanner

HeaderRule IDsWhat the audit checks
Strict-Transport-SecurityHDR-HSTS-MISSING, HDR-HSTS-SHORT, HDR-HSTS-NO-SUBDOMAINSChecks header presence, confirms max-age is at least one year, and verifies includeSubDomains.
Content-Security-PolicyHDR-CSP-MISSING, HDR-CSP-WEAKFlags missing policies, 'unsafe-inline', 'unsafe-eval', wildcards in script or default sources, and missing object-src 'none' or base-uri.
X-Frame-OptionsHDR-XFO-MISSING, HDR-XFO-INVALIDVerifies clickjacking protection through DENY, SAMEORIGIN, or CSP frame-ancestors.
X-Content-Type-OptionsHDR-XCTO-MISSINGChecks for nosniff to block MIME type sniffing across scripts and stylesheets.
Referrer-PolicyHDR-REFERRER-MISSING, HDR-REFERRER-OKFlags missing policies or unsafe values that leak query strings to third parties.
Permissions-PolicyHDR-PERMISSIONS-MISSING, HDR-PERMISSIONS-OKChecks browser feature restrictions such as camera, microphone, and geolocation.
Isolation headersHDR-COOP-INFO, HDR-CORP-INFOReports missing Cross-Origin-Opener-Policy and Cross-Origin-Resource-Policy on documents.

Run a header audit and print Nginx fixes

web-vuln-scanner https://example.com --fix-config nginx --view developer
web-vuln-scanner https://example.com --max-pages 15 --html headers-report.html

Passing --fix-config nginx (or caddy / apache) inspects the findings collected during the run and prints copy-pasteable directives only for headers your server actually missed.

Frequently asked questions

Does web-vuln-scanner check headers only on the home page?

No. By default it crawls up to 10 same-origin pages (--max-pages 10) because login forms, API gateways, and static routes often return different headers.

Why did the scanner report both X-Frame-Options and CSP?

Browsers honor CSP frame-ancestors first, while older clients still read X-Frame-Options. Keeping both consistent avoids gaps on legacy browsers.

Related guides

CSP header audit and rules

Fix unsafe-inline, missing object-src, and wildcard script directives.

Nginx, Caddy, and Apache fixes

Generate targeted server config blocks directly from scan results.

HTTP cookie flag checker

Inspect Secure, HttpOnly, and SameSite attributes on Set-Cookie headers.