Upload 4 files
Browse filesInitial upload v<version>
Files changed (4)
- README.mdAdded+81
- http-security-headers.jsonAdded+247
- http-security-headers.schema.jsonAdded+65
- records-headers.jsonlAdded+9
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081---license: cc0-1.0pretty_name: "HTTP Security Headers Reference"language:- ensize_categories:- n<1Ktags:- security- http-headers- csp- hsts- web-security- json- json-schemaconfigs:- config_name: headers data_files: records-headers.jsonl default: true---# 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/](https://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`](https://www.aptdot.com/data/v1/http-security-headers.schema.json) (Draft 2020-12) || Source repository | [github.com/mkchd25/aptdot-datasets](https://github.com/mkchd25/aptdot-datasets) || Publisher | [Aptdot](https://www.aptdot.com) |
## 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
```pythonfrom datasets import load_dataset
rows = load_dataset("aptdot/http-security-headers", "headers", split="train")```
Or use the complete JSON file as it is:
```pythonimport jsonfrom 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](https://www.aptdot.com/tools/json-schema-validator/). It runs in yourbrowser, 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](https://github.com/mkchd25/aptdot-datasets/blob/main/CHANGELOG.md).
## License
CC0 1.0 Universal: public domain. You can copy, change and use it for any purpose, including commercial use, without asking.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247{ "$schema": "https://www.aptdot.com/data/v1/http-security-headers.schema.json", "metadata": { "name": "HTTP Security & Permissions Policy Headers Matrix", "version": "1.1.2", "generated_at": "2026-09-27T07:15:00.000Z", "license": "https://creativecommons.org/publicdomain/zero/1.0/", "total_headers": 9, "description": "Standardized baseline and hardened reference configurations for HTTP response headers across web applications, edge runtimes, and APIs." }, "headers": [ { "header": "Content-Security-Policy", "category": "Cross-Site Scripting & Injection Mitigation", "rfc_w3c_spec": "https://www.w3.org/TR/CSP3/", "baseline_default": "default-src 'self';", "recommended_production": "default-src 'self'; script-src 'self' 'strict-dynamic'; object-src 'none'; base-uri 'none'; frame-ancestors 'none';", "risk_level": "Critical", "app_targets": ["spa", "ssr", "monolith"], "deprecated_alternatives": ["X-XSS-Protection", "X-Frame-Options (superseded by frame-ancestors)"], "browser_compatibility": { "chrome": "25+", "firefox": "23+", "safari": "7+", "edge": "12+" }, "common_pitfalls": "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 response header 'Reporting-Endpoints: <endpoint-name>=\"https://example.com/csp-reports\"'.", "snippets": { "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';\" }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Content-Security-Policy\", \"value\": \"default-src 'self'; frame-ancestors 'none';\" } ] }", "netlify": "/*\n Content-Security-Policy: default-src 'self'; frame-ancestors 'none';", "caddy": "header Content-Security-Policy \"default-src 'self'; frame-ancestors 'none';\"", "helmet": "helmet({ contentSecurityPolicy: { directives: { defaultSrc: [\"'self'\"], frameAncestors: [\"'none'\"] } } })" } }, { "header": "Strict-Transport-Security", "category": "Transport Layer & Protocol Security", "rfc_w3c_spec": "https://datatracker.ietf.org/doc/html/rfc6797", "baseline_default": "max-age=31536000", "recommended_production": "max-age=63072000; includeSubDomains; preload", "risk_level": "High", "app_targets": ["spa", "ssr", "api-only", "microservice"], "deprecated_alternatives": [], "browser_compatibility": { "chrome": "4+", "firefox": "4+", "safari": "7+", "edge": "12+" }, "common_pitfalls": "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.", "snippets": { "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' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Strict-Transport-Security\", \"value\": \"max-age=63072000; includeSubDomains; preload\" } ] }", "netlify": "/*\n Strict-Transport-Security: max-age=63072000; includeSubDomains; preload", "caddy": "header Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"", "helmet": "helmet.hsts({ maxAge: 63072000, includeSubDomains: true, preload: true })" } }, { "header": "Permissions-Policy", "category": "Browser Hardware & Feature Isolation", "rfc_w3c_spec": "https://www.w3.org/TR/permissions-policy-1/", "baseline_default": "camera=(), microphone=(), geolocation=()", "recommended_production": "camera=(), microphone=(), geolocation=(), browsing-topics=(), payment=(), usb=()", "risk_level": "Medium", "app_targets": ["spa", "ssr", "monolith"], "deprecated_alternatives": ["Feature-Policy"], "browser_compatibility": { "chrome": "88+", "edge": "88+", "firefox": "not supported (header; supports iframe allow attribute only)", "safari": "not supported (header; supports iframe allow attribute only)" }, "common_pitfalls": "Permissions-Policy is enforced via response headers in Chromium browsers only; Firefox and Safari require the HTML 'allow' attribute directly on <iframe> tags.", "snippets": { "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\": \"/(.*)\", \"headers\": [ { \"key\": \"Permissions-Policy\", \"value\": \"camera=(), microphone=(), geolocation=()\" } ] }", "netlify": "/*\n Permissions-Policy: camera=(), microphone=(), geolocation=()", "caddy": "header Permissions-Policy \"camera=(), microphone=(), geolocation=()\"", "helmet": "app.use((req, res, next) => { res.setHeader('Permissions-Policy', 'camera=(), microphone=(), geolocation=()'); next(); })" } }, { "header": "X-Content-Type-Options", "category": "MIME-Type Sniffing Mitigation", "rfc_w3c_spec": "https://fetch.spec.whatwg.org/#x-content-type-options-header", "baseline_default": "nosniff", "recommended_production": "nosniff", "risk_level": "Medium", "app_targets": ["spa", "ssr", "api-only", "microservice"], "deprecated_alternatives": [], "browser_compatibility": { "chrome": "1+", "firefox": "50+", "safari": "6+", "edge": "12+" }, "common_pitfalls": "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.", "snippets": { "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\" } ] }", "netlify": "/*\n X-Content-Type-Options: nosniff", "caddy": "header X-Content-Type-Options \"nosniff\"", "helmet": "helmet.noSniff()" } }, { "header": "X-Frame-Options", "category": "Legacy Clickjacking Mitigation", "rfc_w3c_spec": "https://datatracker.ietf.org/doc/html/rfc7034", "baseline_default": "SAMEORIGIN", "recommended_production": "DENY", "risk_level": "Medium", "app_targets": ["spa", "ssr", "monolith"], "deprecated_alternatives": ["Superseded by CSP: frame-ancestors"], "browser_compatibility": { "chrome": "1+", "firefox": "3.6+", "safari": "4+", "edge": "12+" }, "common_pitfalls": "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.", "snippets": { "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-Options: DENY", "caddy": "header X-Frame-Options \"DENY\"", "helmet": "helmet.frameguard({ action: 'deny' })" } }, { "header": "Referrer-Policy", "category": "Privacy & Tracking Leakage Prevention", "rfc_w3c_spec": "https://www.w3.org/TR/referrer-policy/", "baseline_default": "strict-origin-when-cross-origin", "recommended_production": "strict-origin-when-cross-origin", "risk_level": "Low", "app_targets": ["spa", "ssr", "monolith", "api-only"], "deprecated_alternatives": [], "browser_compatibility": { "chrome": "61+", "firefox": "52+", "safari": "14+", "edge": "79+" }, "common_pitfalls": "Avoid using 'no-referrer-when-downgrade' or 'unsafe-url', as these leak complete path parameters and query strings to third-party tracking services.", "snippets": { "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\": \"Referrer-Policy\", \"value\": \"strict-origin-when-cross-origin\" } ] }", "netlify": "/*\n Referrer-Policy: strict-origin-when-cross-origin", "caddy": "header Referrer-Policy \"strict-origin-when-cross-origin\"", "helmet": "helmet.referrerPolicy({ policy: 'strict-origin-when-cross-origin' })" } }, { "header": "Cross-Origin-Opener-Policy", "category": "Process Isolation & Spectre Attack Mitigation", "rfc_w3c_spec": "https://html.spec.whatwg.org/multipage/browsers.html#cross-origin-opener-policies", "baseline_default": "same-origin-allow-popups", "recommended_production": "same-origin", "risk_level": "High", "app_targets": ["spa", "ssr"], "deprecated_alternatives": [], "browser_compatibility": { "chrome": "83+", "firefox": "79+", "safari": "15.2+", "edge": "83+" }, "common_pitfalls": "Enabling 'same-origin' severs window.opener cross-origin references, which will break third-party OAuth popup workflows unless configured with 'same-origin-allow-popups'.", "snippets": { "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-Policy\", \"value\": \"same-origin\" } ] }", "netlify": "/*\n Cross-Origin-Opener-Policy: same-origin", "caddy": "header Cross-Origin-Opener-Policy \"same-origin\"", "helmet": "helmet.crossOriginOpenerPolicy({ policy: 'same-origin' })" } }, { "header": "Cross-Origin-Embedder-Policy", "category": "Process Isolation & Spectre Attack Mitigation", "rfc_w3c_spec": "https://html.spec.whatwg.org/multipage/browsers.html#cross-origin-embedder-policy", "baseline_default": "unsafe-none", "recommended_production": "require-corp", "risk_level": "High", "app_targets": ["spa", "ssr"], "deprecated_alternatives": [], "browser_compatibility": { "chrome": "83+", "firefox": "79+", "safari": "15.2+", "edge": "83+" }, "common_pitfalls": "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.", "snippets": { "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-Embedder-Policy\", \"value\": \"require-corp\" } ] }", "netlify": "/*\n Cross-Origin-Embedder-Policy: require-corp", "caddy": "header Cross-Origin-Embedder-Policy \"require-corp\"", "helmet": "helmet.crossOriginEmbedderPolicy({ policy: 'require-corp' })" } }, { "header": "Cross-Origin-Resource-Policy", "category": "Cross-Origin Asset Leakage Defense", "rfc_w3c_spec": "https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header", "baseline_default": "same-site", "recommended_production": "same-origin", "risk_level": "Medium", "app_targets": ["spa", "ssr", "api-only"], "deprecated_alternatives": [], "browser_compatibility": { "chrome": "73+", "firefox": "74+", "safari": "12+", "edge": "79+" }, "common_pitfalls": "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.", "snippets": { "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-Resource-Policy\", \"value\": \"same-origin\" } ] }", "netlify": "/*\n Cross-Origin-Resource-Policy: same-origin", "caddy": "header Cross-Origin-Resource-Policy \"same-origin\"", "helmet": "helmet.crossOriginResourcePolicy({ policy: 'same-origin' })" } } ]}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://www.aptdot.com/data/v1/http-security-headers.schema.json", "title": "Aptdot HTTPSecurityHeadersMatrix", "type": "object", "required": ["metadata", "headers"], "properties": { "metadata": { "type": "object", "required": ["name", "version", "generated_at", "license", "total_headers", "description"], "properties": { "name": { "type": "string" }, "version": { "type": "string" }, "generated_at": { "type": "string", "format": "date-time" }, "license": { "type": "string", "format": "uri" }, "total_headers": { "type": "integer", "minimum": 1 }, "description": { "type": "string" } } }, "headers": { "type": "array", "items": { "type": "object", "required": [ "header", "category", "rfc_w3c_spec", "baseline_default", "recommended_production", "risk_level", "app_targets", "deprecated_alternatives", "browser_compatibility", "common_pitfalls", "snippets" ], "properties": { "header": { "type": "string" }, "category": { "type": "string" }, "rfc_w3c_spec": { "type": "string", "format": "uri" }, "baseline_default": { "type": "string" }, "recommended_production": { "type": "string" }, "risk_level": { "type": "string", "enum": ["Critical", "High", "Medium", "Low"] }, "app_targets": { "type": "array", "items": { "type": "string" } }, "deprecated_alternatives": { "type": "array", "items": { "type": "string" } }, "browser_compatibility": { "type": "object" }, "common_pitfalls": { "type": "string" }, "snippets": { "type": "object", "required": ["nginx", "apache", "next_js", "vercel", "netlify", "caddy", "helmet"], "properties": { "nginx": { "type": "string" }, "apache": { "type": "string" }, "next_js": { "type": "string" }, "vercel": { "type": "string" }, "netlify": { "type": "string" }, "caddy": { "type": "string" }, "helmet": { "type": "string" } } } } } } }}123456789{"header": "Content-Security-Policy", "category": "Cross-Site Scripting & Injection Mitigation", "rfc_w3c_spec": "https://www.w3.org/TR/CSP3/", "baseline_default": "default-src 'self';", "recommended_production": "default-src 'self'; script-src 'self' 'strict-dynamic'; object-src 'none'; base-uri 'none'; frame-ancestors 'none';", "risk_level": "Critical", "app_targets": ["spa", "ssr", "monolith"], "deprecated_alternatives": ["X-XSS-Protection", "X-Frame-Options (superseded by frame-ancestors)"], "browser_compatibility": {"chrome": "25+", "firefox": "23+", "safari": "7+", "edge": "12+"}, "common_pitfalls": "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 response header 'Reporting-Endpoints: <endpoint-name>=\"https://example.com/csp-reports\"'.", "snippets": {"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';\" }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Content-Security-Policy\", \"value\": \"default-src 'self'; frame-ancestors 'none';\" } ] }", "netlify": "/*\n Content-Security-Policy: default-src 'self'; frame-ancestors 'none';", "caddy": "header Content-Security-Policy \"default-src 'self'; frame-ancestors 'none';\"", "helmet": "helmet({ contentSecurityPolicy: { directives: { defaultSrc: [\"'self'\"], frameAncestors: [\"'none'\"] } } })"}}{"header": "Strict-Transport-Security", "category": "Transport Layer & Protocol Security", "rfc_w3c_spec": "https://datatracker.ietf.org/doc/html/rfc6797", "baseline_default": "max-age=31536000", "recommended_production": "max-age=63072000; includeSubDomains; preload", "risk_level": "High", "app_targets": ["spa", "ssr", "api-only", "microservice"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "4+", "firefox": "4+", "safari": "7+", "edge": "12+"}, "common_pitfalls": "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.", "snippets": {"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' }", "vercel": "{ \"source\": \"/(.*)\", \"headers\": [ { \"key\": \"Strict-Transport-Security\", \"value\": \"max-age=63072000; includeSubDomains; preload\" } ] }", "netlify": "/*\n Strict-Transport-Security: max-age=63072000; includeSubDomains; preload", "caddy": "header Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"", "helmet": "helmet.hsts({ maxAge: 63072000, includeSubDomains: true, preload: true })"}}{"header": "Permissions-Policy", "category": "Browser Hardware & Feature Isolation", "rfc_w3c_spec": "https://www.w3.org/TR/permissions-policy-1/", "baseline_default": "camera=(), microphone=(), geolocation=()", "recommended_production": "camera=(), microphone=(), geolocation=(), browsing-topics=(), payment=(), usb=()", "risk_level": "Medium", "app_targets": ["spa", "ssr", "monolith"], "deprecated_alternatives": ["Feature-Policy"], "browser_compatibility": {"chrome": "88+", "edge": "88+", "firefox": "not supported (header; supports iframe allow attribute only)", "safari": "not supported (header; supports iframe allow attribute only)"}, "common_pitfalls": "Permissions-Policy is enforced via response headers in Chromium browsers only; Firefox and Safari require the HTML 'allow' attribute directly on <iframe> tags.", "snippets": {"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\": \"/(.*)\", \"headers\": [ { \"key\": \"Permissions-Policy\", \"value\": \"camera=(), microphone=(), geolocation=()\" } ] }", "netlify": "/*\n Permissions-Policy: camera=(), microphone=(), geolocation=()", "caddy": "header Permissions-Policy \"camera=(), microphone=(), geolocation=()\"", "helmet": "app.use((req, res, next) => { res.setHeader('Permissions-Policy', 'camera=(), microphone=(), geolocation=()'); next(); })"}}{"header": "X-Content-Type-Options", "category": "MIME-Type Sniffing Mitigation", "rfc_w3c_spec": "https://fetch.spec.whatwg.org/#x-content-type-options-header", "baseline_default": "nosniff", "recommended_production": "nosniff", "risk_level": "Medium", "app_targets": ["spa", "ssr", "api-only", "microservice"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "1+", "firefox": "50+", "safari": "6+", "edge": "12+"}, "common_pitfalls": "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.", "snippets": {"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\" } ] }", "netlify": "/*\n X-Content-Type-Options: nosniff", "caddy": "header X-Content-Type-Options \"nosniff\"", "helmet": "helmet.noSniff()"}}{"header": "X-Frame-Options", "category": "Legacy Clickjacking Mitigation", "rfc_w3c_spec": "https://datatracker.ietf.org/doc/html/rfc7034", "baseline_default": "SAMEORIGIN", "recommended_production": "DENY", "risk_level": "Medium", "app_targets": ["spa", "ssr", "monolith"], "deprecated_alternatives": ["Superseded by CSP: frame-ancestors"], "browser_compatibility": {"chrome": "1+", "firefox": "3.6+", "safari": "4+", "edge": "12+"}, "common_pitfalls": "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.", "snippets": {"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-Options: DENY", "caddy": "header X-Frame-Options \"DENY\"", "helmet": "helmet.frameguard({ action: 'deny' })"}}{"header": "Referrer-Policy", "category": "Privacy & Tracking Leakage Prevention", "rfc_w3c_spec": "https://www.w3.org/TR/referrer-policy/", "baseline_default": "strict-origin-when-cross-origin", "recommended_production": "strict-origin-when-cross-origin", "risk_level": "Low", "app_targets": ["spa", "ssr", "monolith", "api-only"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "61+", "firefox": "52+", "safari": "14+", "edge": "79+"}, "common_pitfalls": "Avoid using 'no-referrer-when-downgrade' or 'unsafe-url', as these leak complete path parameters and query strings to third-party tracking services.", "snippets": {"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\": \"Referrer-Policy\", \"value\": \"strict-origin-when-cross-origin\" } ] }", "netlify": "/*\n Referrer-Policy: strict-origin-when-cross-origin", "caddy": "header Referrer-Policy \"strict-origin-when-cross-origin\"", "helmet": "helmet.referrerPolicy({ policy: 'strict-origin-when-cross-origin' })"}}{"header": "Cross-Origin-Opener-Policy", "category": "Process Isolation & Spectre Attack Mitigation", "rfc_w3c_spec": "https://html.spec.whatwg.org/multipage/browsers.html#cross-origin-opener-policies", "baseline_default": "same-origin-allow-popups", "recommended_production": "same-origin", "risk_level": "High", "app_targets": ["spa", "ssr"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "83+", "firefox": "79+", "safari": "15.2+", "edge": "83+"}, "common_pitfalls": "Enabling 'same-origin' severs window.opener cross-origin references, which will break third-party OAuth popup workflows unless configured with 'same-origin-allow-popups'.", "snippets": {"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-Policy\", \"value\": \"same-origin\" } ] }", "netlify": "/*\n Cross-Origin-Opener-Policy: same-origin", "caddy": "header Cross-Origin-Opener-Policy \"same-origin\"", "helmet": "helmet.crossOriginOpenerPolicy({ policy: 'same-origin' })"}}{"header": "Cross-Origin-Embedder-Policy", "category": "Process Isolation & Spectre Attack Mitigation", "rfc_w3c_spec": "https://html.spec.whatwg.org/multipage/browsers.html#cross-origin-embedder-policy", "baseline_default": "unsafe-none", "recommended_production": "require-corp", "risk_level": "High", "app_targets": ["spa", "ssr"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "83+", "firefox": "79+", "safari": "15.2+", "edge": "83+"}, "common_pitfalls": "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.", "snippets": {"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-Embedder-Policy\", \"value\": \"require-corp\" } ] }", "netlify": "/*\n Cross-Origin-Embedder-Policy: require-corp", "caddy": "header Cross-Origin-Embedder-Policy \"require-corp\"", "helmet": "helmet.crossOriginEmbedderPolicy({ policy: 'require-corp' })"}}{"header": "Cross-Origin-Resource-Policy", "category": "Cross-Origin Asset Leakage Defense", "rfc_w3c_spec": "https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header", "baseline_default": "same-site", "recommended_production": "same-origin", "risk_level": "Medium", "app_targets": ["spa", "ssr", "api-only"], "deprecated_alternatives": [], "browser_compatibility": {"chrome": "73+", "firefox": "74+", "safari": "12+", "edge": "79+"}, "common_pitfalls": "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.", "snippets": {"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-Resource-Policy\", \"value\": \"same-origin\" } ] }", "netlify": "/*\n Cross-Origin-Resource-Policy: same-origin", "caddy": "header Cross-Origin-Resource-Policy \"same-origin\"", "helmet": "helmet.crossOriginResourcePolicy({ policy: 'same-origin' })"}}README.mdAdded+81
http-security-headers.jsonAdded+247
http-security-headers.schema.jsonAdded+65
records-headers.jsonlAdded+9