Security Headers API
free/v1/security/headersComprehensive HTTP security-header audit aligned with OWASP Secure Headers Project + CSP Level 3 + CHIPS / Partitioned cookie rules. Evaluates Content-Security-Policy (incl. `strict-dynamic`, nonces, hashes, Trusted Types, reporting endpoints), Strict-Transport-Security, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, and Cross-Origin policies (COEP, COOP, CORP). Performs deep cookie analysis — Secure / HttpOnly / SameSite / `__Host-` / `__Secure-` / `Partitioned` (CHIPS). Flags Cache-Control on likely-sensitive endpoints and fingerprints the Server / X-Powered-By software with known-EOL warnings.
What It Does
Fetches the URL with bounded destination-validated redirects and evaluates effective HSTS, CSP, framing, referrer and contextual isolation policies using the same parser as composite reports. First CSP directives and independently enforced policies retain browser semantics. Cookie-setting attempts, reporting declarations and optional error-page observations are separate diagnostics; they do not establish runtime storage, report delivery, exploit resistance or legal compliance.
Why It's Useful
HTTP security headers are your first line of defense against common web attacks including XSS, clickjacking, MIME-sniffing, and protocol downgrade attacks. OWASP, Mozilla Observatory, and compliance frameworks (PCI-DSS 4.0, SOC 2, HIPAA) all recommend these headers. Regular auditing identifies missing headers and conflicting directives so teams can review and remediate their configuration.
Use Cases
Application Security Audit
Before deployment, verify that all required security headers are properly configured across web applications. Compare results against OWASP Secure Headers Project recommendations.
Catch security header misconfigurations before they reach production.
Compliance Verification
Document security header configuration as evidence for PCI-DSS 4.0 Requirement 6.4, SOC 2 CC6.1, or HIPAA Technical Safeguards audits.
Automate compliance evidence collection for security controls.
Vendor Security Assessment
Evaluate the security posture of third-party vendors and SaaS providers by analyzing their web application security headers as part of vendor risk management.
Assess vendor security without requiring access to their infrastructure.
CI/CD Security Gate
Integrate security header checks into CI/CD pipelines to automatically validate headers after each deployment.
Prevent security regressions with automated header validation.
Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
url | query | string | Required | The full URL to analyze (must include https://)Example: https://example.com |
follow_redirects | query | string | Optional | Whether to follow HTTP redirects (default: true). Set to "false" to analyze the initial response.Example: true |
probe | query | string | Optional | Set "errors" to request an unlikely-existing path on the same origin. Reports whether an error response, a non-error response or no usable response was observed, with header comparison only for observed error responses.Example: errors |
Response Fields
Result fields below are inside the JSON data object. Any row named meta describes the sibling response metadata object. See response and error handling for status codes and error responses. Optional observations may be absent or null; inspect warnings and partial-failure fields before treating a missing result as a negative finding.
| Field | Type | Description |
|---|---|---|
url | string | The original requested URL |
final_url | string | The final URL after redirects |
status_code | number | HTTP response status code |
headers.present | array | Security headers found with name, value, and status (good/warning/present/info) |
headers.missing | array | Missing security headers with name, required flag, and description |
score | object | Scoring breakdown: total points, max possible, letter grade (A–F), and percentage |
server_info | object | { server, powered_by, fingerprint }. fingerprint resolves the Server header to a known product/version and flags known-EOL releases. |
cookies | object | Response-header cookie attributes and static eligibility; actual browser storage and cross-site use are unmeasured. Legacy chips_required is contextual advice, not a universal Partitioned requirement. |
cache_control | object | Delivered cache policy and heuristic sensitivity signals. Set-Cookie alone does not prove sensitive content; storage advice depends on response context. |
reporting | object | Phase 2: parses Report-To, Reporting-Endpoints, and NEL headers. CSP reporting directives are also recognized; declared destinations do not prove report delivery. Flags non-HTTPS reporting URLs. |
error_page_probe | object | null | Optional probe outcome: observed error response, non-error response or unavailable. Header differences apply only to the actual observed error response and do not establish all-error-page coverage. |
recommendations | array | Prioritized remediation recommendations |
breakdown | object | Per-header scoring contributions. |
status_warning | string|null | Warning when the response may be an HTTP error page. |
Code Examples
Replace YOUR_API_KEY with your API key. This endpoint requires the free plan or higher; see plans and usage limits.
curl --request GET 'https://api.edgedns.dev/v1/security/headers?url=https%3A%2F%2Fexample.com' \
--header "Authorization: Bearer YOUR_API_KEY"const response = await fetch(
"https://api.edgedns.dev/v1/security/headers?url=https%3A%2F%2Fexample.com",
{
"method": "GET",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
);
if (!response.ok) {
throw new Error(`EdgeDNS returned HTTP ${response.status}`);
}
const data = await response.json();
console.log(data);import requests
response = requests.request(
'GET',
"https://api.edgedns.dev/v1/security/headers?url=https%3A%2F%2Fexample.com",
headers={'Authorization': 'Bearer YOUR_API_KEY'},
timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)Read the full Security Headers guide
Learn the concepts, choose a practical workflow, and interpret the observations from Security Headers before acting on them. Run supported checks via MCP or through REST.
Read the guide →Related Endpoints
External References
Learn more about the standards and protocols behind this endpoint.
Try This Endpoint
Test the Security Headers endpoint live in the playground.