Security headers — reverse-proxy reference
Reference nginx and Caddy snippets for security headers when the web UI is served separately from the API.
nginx#
# Place inside your server {} block for the web UI.
add_header Content-Security-Policy "default-src 'self'" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;Caddy#
header {
Content-Security-Policy "default-src 'self'"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
Referrer-Policy "strict-origin-when-cross-origin"
Strict-Transport-Security "max-age=63072000; includeSubDomains"
}Notes#
- The
Content-Security-Policyabove is intentionally strict (default-src 'self'). If you embed inline scripts or load fonts/images from a CDN, extend it rather than weakening tounsafe-inline. - HSTS
max-age=63072000is two years; browsers will refuse plain HTTP for that domain after the first HTTPS visit. X-Frame-Options: DENYandframe-ancestors 'none'in CSP are equivalent; both are present for older browser compatibility.
Report an inaccuracy (opens a support ticket in the portal; nothing is sent from this page)