Your Headers
- Strict-Transport-Security
- max-age=31536000
- Content-Security-Policy
- frame-ancestors 'self'
- X-Frame-Options
- SAMEORIGIN
- X-Content-Type-Options
- nosniff
- Referrer-Policy
- strict-origin-when-cross-origin
- Permissions-Policy
- camera=(), microphone=(), geolocation=(), payment=(), usb=(), browsing-topics=()
- Cross-Origin-Opener-Policy
- same-origin-allow-popups
- Note: Without a Content Security Policy of your own, the most important protection against cross-site scripting is missing. A CSP must match your scripts: create it specifically, test it as Report-Only first and then paste it into the “Content-Security-Policy” field.
Configuration
# nginx: in the server block (or location block)
# always: also send with error pages and redirects
add_header Strict-Transport-Security "max-age=31536000" always;
add_header Content-Security-Policy "frame-ancestors 'self'" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=(), usb=(), browsing-topics=()" always;
add_header Cross-Origin-Opener-Policy "same-origin-allow-popups" always;
# Hide version information
server_tokens off;
fastcgi_hide_header X-Powered-By; # with PHP-FPM
proxy_hide_header X-Powered-By; # with a reverse proxy- The Content Security Policy only contains frame-ancestors. If your website already sets a CSP, both apply side by side; better add frame-ancestors to the existing policy (“Content-Security-Policy” field above).
- add_header in a location block cancels all inherited add_header lines (nginx documentation). Therefore copy the lines into every block with its own add_header lines.
- server_tokens off removes the version number, not the word nginx. X-Powered-By is usually set by the application behind it (PHP-FPM, proxy); use whichever of the two hide_header lines fits your setup.
Only in your browser: this tool sends nothing to TOMORIS or third parties. After deploying, check with the security header check.
BASICS
Recommendations
with Sources.
The preselection follows published recommendations. Where a header has side effects, the warning is right next to it.
OWASP HTTP Headers Cheat Sheet
Recommended values for Referrer-Policy, X-Content-Type-Options, clickjacking protection, cross-origin headers and hiding version information.
Cheat Sheethstspreload.org
Conditions for the browsers’ preload list and the introduction of HSTS in stages.
ConditionsMDN Web Docs
Reference of all headers and values, including Permissions-Policy, Cross-Origin-Resource-Policy and Cross-Origin-Embedder-Policy.
Reference
QUESTIONS
Good to Know.
Is my selection transferred to TOMORIS?
No. The generator runs entirely in your browser. The page sends your selection nowhere and does not store it.
Which grade do I reach with the recommendation?
With the preselection, a matching Content Security Policy, a valid certificate and a permanent redirect from HTTP to HTTPS, the security header check gives the grade A+. We check this automatically with every change. Without a CSP of your own it stays at A, because the most important protection against cross-site scripting is missing.
Why does the generator not create a complete CSP?
A Content Security Policy must match the scripts, fonts and services of your website. A blanket policy quickly blocks your own content. Paste your tested policy; the generator then adds the clickjacking protection frame-ancestors.
Should I set HSTS with preload?
Only if all subdomains are permanently reachable over HTTPS. According to hstspreload.org, inclusion in the browsers’ preload list can hardly be undone; a removal takes months. Ideally introduce HSTS in stages: a few minutes, one week, one month, then one year.
Why are CORP and COEP not preselected?
Both restrict who may embed your files or what your page may load from others. This easily breaks embedded maps, videos, fonts or images on other websites. You only need COEP for cross-origin isolation, for example for SharedArrayBuffer.
TOOLBOX
More
Tools.
CSP Generator
Paste a policy and have it rated, or build a new one from templates. With output for nginx, Apache, IIS, Next.js and the meta tag. Runs only in your browser.
ViewDMARC Generator
Choose a level, add reporting addresses and copy the record: from p=none to p=reject, with each tag explained and guidance on common mistakes. Runs only in your browser.
ViewSPF Generator
Select services and servers, then copy the record: counts DNS lookups against the limit of 10 and explains every mechanism. Runs only in your browser.
View
YOUR NEXT STEP
You Have the Result.
What Comes Next?
We assess findings, prioritize by risk and put changes into practice on request: as a project with EXPERTS or as ongoing operations with GRID.