Discuss your project

TOOLBOX · TOOL

Create Security Headers.

Choose protective headers, read the warnings and copy the finished configuration for your server. Runs only in your browser.

HSTS (Strict-Transport-Security)

Forces browsers to call your domain only over HTTPS. Only set it once HTTPS works with a valid certificate.

Clickjacking Protection

Defines whether other websites may show your pages in a frame.

Content and Sharing
Permissions-Policy

Neither your page nor embedded content can request blocked features. Only block what your website does not need.

Cross-Origin Isolation

Separates your page from other windows and embeddings. CORP and COEP have side effects – read the notes below.

Content-Security-Policy

Optional: your policy, e.g. from the CSP generator. frame-ancestors is added if it is missing.

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

Server or platform
security-header.nginx.conf
# 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.

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.

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.