HTTP Headers Checker (Parser/Analyzer)
Enterprise-grade HTTP header analysis tool. Audits security policies (CSP, HSTS), detects deprecated configurations, and generates server-hardening snippets for Nginx/Apache.
About
In the modern web ecosystem, HTTP headers are the first line of defense against sophisticated attack vectors. While the response body carries the data, the headers define the rules of engagement between the browser and the server. A single misconfiguration can expose an application to Cross-Site Scripting (XSS), Clickjacking, or SSL Stripping.
This tool is not a simple parser; it is a comprehensive auditing engine. It evaluates your security posture against industry benchmarks (OWASP, Mozilla Observatory), dissects complex directives like Content-Security-Policy, and mathematically verifies time-based security contracts like HSTS. It is designed for Systems Architects and Security Engineers who demand precision over approximation.
Formulas
The security score is calculated using a weighted subtraction algorithm based on the severity of missing or misconfigured headers. The HSTS validity logic specifically requires the age to meet the preload list standard:
When calculating cache lifetimes, we normalize all time units to seconds for comparison:
Reference Data
| Header | Security Function | Critical Thresholds | Impact Factor |
|---|---|---|---|
| Strict-Transport-Security | Enforces HTTPS connection | max-age ≥ 31536000 | Prevents Man-in-the-Middle (MitM) & SSL Stripping. |
| Content-Security-Policy | Resource execution control | No "unsafe-inline"; No "unsafe-eval" | The primary defense against XSS (Cross-Site Scripting). |
| X-Frame-Options | Iframe control | DENY or SAMEORIGIN | Blocks Clickjacking / UI Redress attacks. |
| Referrer-Policy | Data leakage control | strict-origin-when-cross-origin | Prevents leaking user URLs to third-party analytics. |
| Permissions-Policy | Browser feature API control | camera=(), microphone=() | Disables powerful APIs (cam, mic, geo) by default. |
| Set-Cookie | Session management | Secure; HttpOnly; SameSite=Strict | Prevents Session Hijacking and XSRF. |
| X-Content-Type-Options | MIME type enforcement | nosniff | Prevents Drive-by-download attacks via MIME sniffing. |
| Cache-Control | Data persistence | no-store, private | Ensures sensitive data is not stored in shared caches. |