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'.
18 lines
574 B
Caddyfile
18 lines
574 B
Caddyfile
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
|
|
}
|
|
|
|
api.lilastudy.com {
|
|
reverse_proxy api:3000
|
|
}
|
|
|
|
git.lilastudy.com {
|
|
reverse_proxy forgejo:3000
|
|
}
|