Skip to content

Commit 00cf5f3

Browse files
committed
Better Caddy security headers
1 parent ba77869 commit 00cf5f3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Caddyfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,13 @@
55
:80 {
66
root * /srv
77
file_server
8+
header {
9+
X-Frame-Options "DENY"
10+
X-Content-Type-Options "nosniff"
11+
Referrer-Policy "no-referrer"
12+
Permissions-Policy "autoplay=(self), fullscreen=(self), picture-in-picture=(), geolocation=(), microphone=(), camera=(), display-capture=(), screen-wake-lock=(), usb=(), serial=(), hid=(), midi=(), payment=(), accelerometer=(), gyroscope=(), magnetometer=(), clipboard-read=(), clipboard-write=(), idle-detection=(), encrypted-media=(), storage-access=(), attribution-reporting=(), browsing-topics=(), run-ad-auction=(), join-ad-interest-group=(), publickey-credentials-get=(), xr-spatial-tracking=(), gamepad=(), sync-xhr=(), local-fonts=(), otp-credentials=(), window-management=()"
13+
Cross-Origin-Resource-Policy "same-origin"
14+
Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
15+
}
816
try_files {path} /index.html
917
}

0 commit comments

Comments
 (0)