feat(caddy): add security headers for frontend
Adds HSTS, CSP, X-Frame-Options, X-Content-Type-Options, and Referrer-Policy to lilastudy.com responses. CSP allows connect-src to api.lilastudy.com over HTTPS and wss:// for WebSocket multiplayer. Tailwind's inline styles require style-src 'unsafe-inline'.
This commit is contained in:
parent
9ab2bc3d0e
commit
76192667e0
1 changed files with 7 additions and 0 deletions
|
|
@ -1,4 +1,11 @@
|
||||||
lilastudy.com {
|
lilastudy.com {
|
||||||
|
header {
|
||||||
|
X-Content-Type-Options "nosniff"
|
||||||
|
X-Frame-Options "DENY"
|
||||||
|
Referrer-Policy "strict-origin-when-cross-origin"
|
||||||
|
Strict-Transport-Security "max-age=31536000; includeSubDomains"
|
||||||
|
Content-Security-Policy "default-src 'self'; connect-src 'self' https://api.lilastudy.com wss://api.lilastudy.com; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'"
|
||||||
|
}
|
||||||
reverse_proxy web:80
|
reverse_proxy web:80
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue