Dataset Viewer
Auto-converted to Parquet Duplicate
header
stringclasses
9 values
category
stringclasses
8 values
rfc_w3c_spec
stringclasses
9 values
baseline_default
stringclasses
9 values
recommended_production
stringclasses
8 values
risk_level
stringclasses
4 values
app_targets
listlengths
2
4
deprecated_alternatives
listlengths
0
2
browser_compatibility
dict
common_pitfalls
stringclasses
9 values
snippets
dict
Content-Security-Policy
Cross-Site Scripting & Injection Mitigation
https://www.w3.org/TR/CSP3/
default-src 'self';
default-src 'self'; script-src 'self' 'strict-dynamic'; object-src 'none'; base-uri 'none'; frame-ancestors 'none';
Critical
[ "spa", "ssr", "monolith" ]
[ "X-XSS-Protection", "X-Frame-Options (superseded by frame-ancestors)" ]
{ "chrome": "25+", "firefox": "23+", "safari": "7+", "edge": "12+" }
Using 'strict-dynamic' requires supplying a per-request cryptographic nonce or hash to script tags; otherwise, legitimate inline scripts fail with 'Refused to load'. If enabling CSP violation reporting, avoid the deprecated 'report-uri' directive; instead use 'report-to <endpoint-name>;' paired with the modern HTTP res...
{ "nginx": "add_header Content-Security-Policy \"default-src 'self'; frame-ancestors 'none';\" always;", "apache": "Header always set Content-Security-Policy \"default-src 'self'; frame-ancestors 'none';\"", "next_js": "{ key: 'Content-Security-Policy', value: \"default-src 'self'; frame-ancestors 'none';\" }", ...
Strict-Transport-Security
Transport Layer & Protocol Security
https://datatracker.ietf.org/doc/html/rfc6797
max-age=31536000
max-age=63072000; includeSubDomains; preload
High
[ "spa", "ssr", "api-only", "microservice" ]
[]
{ "chrome": "4+", "firefox": "4+", "safari": "7+", "edge": "12+" }
Submitting a domain to the HSTS preload list is effectively permanent; if any staging or internal subdomain lacks HTTPS, it will become inaccessible across major browsers.
{ "nginx": "add_header Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\" always;", "apache": "Header always set Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"", "next_js": "{ key: 'Strict-Transport-Security', value: 'max-age=63072000; includeSubDomains; preload...
Permissions-Policy
Browser Hardware & Feature Isolation
https://www.w3.org/TR/permissions-policy-1/
camera=(), microphone=(), geolocation=()
camera=(), microphone=(), geolocation=(), browsing-topics=(), payment=(), usb=()
Medium
[ "spa", "ssr", "monolith" ]
[ "Feature-Policy" ]
{ "chrome": "88+", "firefox": "not supported (header; supports iframe allow attribute only)", "safari": "not supported (header; supports iframe allow attribute only)", "edge": "88+" }
Permissions-Policy is enforced via response headers in Chromium browsers only; Firefox and Safari require the HTML 'allow' attribute directly on <iframe> tags.
{ "nginx": "add_header Permissions-Policy \"camera=(), microphone=(), geolocation=()\" always;", "apache": "Header always set Permissions-Policy \"camera=(), microphone=(), geolocation=()\"", "next_js": "{ key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=()' }", "vercel": "{ \"source\": ...
X-Content-Type-Options
MIME-Type Sniffing Mitigation
https://fetch.spec.whatwg.org/#x-content-type-options-header
nosniff
nosniff
Medium
[ "spa", "ssr", "api-only", "microservice" ]
[]
{ "chrome": "1+", "firefox": "50+", "safari": "6+", "edge": "12+" }
If your web server serves stylesheets or JavaScript files with missing or incorrect Content-Type headers (e.g., text/plain), modern browsers will refuse to execute them.
{ "nginx": "add_header X-Content-Type-Options \"nosniff\" always;", "apache": "Header always set X-Content-Type-Options \"nosniff\"", "next_js": "{ key: 'X-Content-Type-Options', value: 'nosniff' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"X-Content-Type-Options\", \"value\": \"nosniff\"...
X-Frame-Options
Legacy Clickjacking Mitigation
https://datatracker.ietf.org/doc/html/rfc7034
SAMEORIGIN
DENY
Medium
[ "spa", "ssr", "monolith" ]
[ "Superseded by CSP: frame-ancestors" ]
{ "chrome": "1+", "firefox": "3.6+", "safari": "4+", "edge": "12+" }
Setting X-Frame-Options to ALLOW-FROM is obsolete and ignored by modern browsers. Use Content-Security-Policy: frame-ancestors https://trusted.example.com instead.
{ "nginx": "add_header X-Frame-Options \"DENY\" always;", "apache": "Header always set X-Frame-Options \"DENY\"", "next_js": "{ key: 'X-Frame-Options', value: 'DENY' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"X-Frame-Options\", \"value\": \"DENY\" } ] }", "netlify": "/*\n X-Frame-Opt...
Referrer-Policy
Privacy & Tracking Leakage Prevention
https://www.w3.org/TR/referrer-policy/
strict-origin-when-cross-origin
strict-origin-when-cross-origin
Low
[ "spa", "ssr", "monolith", "api-only" ]
[]
{ "chrome": "61+", "firefox": "52+", "safari": "14+", "edge": "79+" }
Avoid using 'no-referrer-when-downgrade' or 'unsafe-url', as these leak complete path parameters and query strings to third-party tracking services.
{ "nginx": "add_header Referrer-Policy \"strict-origin-when-cross-origin\" always;", "apache": "Header always set Referrer-Policy \"strict-origin-when-cross-origin\"", "next_js": "{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\":...
Cross-Origin-Opener-Policy
Process Isolation & Spectre Attack Mitigation
https://html.spec.whatwg.org/multipage/browsers.html#cross-origin-opener-policies
same-origin-allow-popups
same-origin
High
[ "spa", "ssr" ]
[]
{ "chrome": "83+", "firefox": "79+", "safari": "15.2+", "edge": "83+" }
Enabling 'same-origin' severs window.opener cross-origin references, which will break third-party OAuth popup workflows unless configured with 'same-origin-allow-popups'.
{ "nginx": "add_header Cross-Origin-Opener-Policy \"same-origin\" always;", "apache": "Header always set Cross-Origin-Opener-Policy \"same-origin\"", "next_js": "{ key: 'Cross-Origin-Opener-Policy', value: 'same-origin' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Cross-Origin-Opener-Poli...
Cross-Origin-Embedder-Policy
Process Isolation & Spectre Attack Mitigation
https://html.spec.whatwg.org/multipage/browsers.html#cross-origin-embedder-policy
unsafe-none
require-corp
High
[ "spa", "ssr" ]
[]
{ "chrome": "83+", "firefox": "79+", "safari": "15.2+", "edge": "83+" }
Setting 'require-corp' blocks all third-party subresources (images, scripts, fonts) that do not explicitly return a Cross-Origin-Resource-Policy (CORP) header. Use 'credentialless' if external assets lack CORP support.
{ "nginx": "add_header Cross-Origin-Embedder-Policy \"require-corp\" always;", "apache": "Header always set Cross-Origin-Embedder-Policy \"require-corp\"", "next_js": "{ key: 'Cross-Origin-Embedder-Policy', value: 'require-corp' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Cross-Origin-Em...
Cross-Origin-Resource-Policy
Cross-Origin Asset Leakage Defense
https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header
same-site
same-origin
Medium
[ "spa", "ssr", "api-only" ]
[]
{ "chrome": "73+", "firefox": "74+", "safari": "12+", "edge": "79+" }
Applying 'same-origin' to public static CDN assets (like public logos or open icons) will cause cross-origin websites and client frontends to fail fetching them.
{ "nginx": "add_header Cross-Origin-Resource-Policy \"same-origin\" always;", "apache": "Header always set Cross-Origin-Resource-Policy \"same-origin\"", "next_js": "{ key: 'Cross-Origin-Resource-Policy', value: 'same-origin' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Cross-Origin-Resou...

HTTP Security Headers Reference

9 HTTP response headers (CSP, HSTS, Permissions-Policy, COOP/COEP/CORP and more) with baseline and hardened values, browser support notes, common pitfalls and config snippets for Nginx, Apache, Next.js, Vercel, Netlify, Caddy and Helmet.

Reference data for security linters, config generators, header scanners and documentation.

Full guide and live preview: www.aptdot.com/datasets/http-security-headers/

Version 1.1.2 (2026-09-27)
License CC0 1.0 (public domain)
JSON Schema http-security-headers.schema.json (Draft 2020-12)
Source repository github.com/mkchd25/aptdot-datasets
Publisher Aptdot

Files

File What it is
http-security-headers.json The complete dataset, identical to the file on aptdot.com and GitHub
http-security-headers.schema.json Its JSON Schema (Draft 2020-12)
records-*.jsonl The main lists, one record per line, for the viewer and the datasets library

Tables

Table Rows File Fields
headers 9 records-headers.jsonl header, category, rfc_w3c_spec, baseline_default, recommended_production, risk_level, app_targets, deprecated_alternatives, ...

Load it

from datasets import load_dataset

rows = load_dataset("aptdot/http-security-headers", "headers", split="train")

Or use the complete JSON file as it is:

import json
from huggingface_hub import hf_hub_download

path = hf_hub_download("aptdot/http-security-headers", "http-security-headers.json", repo_type="dataset")
data = json.load(open(path, encoding="utf-8"))

Check your own data against the schema

Paste your records and http-security-headers.schema.json into the free JSON Schema Validator. It runs in your browser, uploads nothing and explains every problem in plain English with its line number.

Notes

  • The records-*.jsonl files are generated from http-security-headers.json. If they ever disagree, http-security-headers.json is the reference.
  • Versions match aptdot.com and GitHub. Changes are listed in the repository's CHANGELOG.

License

CC0 1.0 Universal: public domain. You can copy, change and use it for any purpose, including commercial use, without asking.

Downloads last month
-