Skip to content

Instantly share code, notes, and snippets.

@hUwUtao
Last active March 29, 2024 03:46
Show Gist options
  • Save hUwUtao/f2fc258c63e8b5dcd36c1e02df5f2f0c to your computer and use it in GitHub Desktop.
Save hUwUtao/f2fc258c63e8b5dcd36c1e02df5f2f0c to your computer and use it in GitHub Desktop.
Caddy basic securityheader.com policy
# SEELE's Security Headers policy
## Howtu use
1. copy seele's policy to the top of your `Caddyfile`
2.
example.com {
import seele
}
3. done ;)
4. https://securityheaders.com and flex
(seele) {
encode gzip
header Strict-Transport-Security "max-age=31536000; includeSubDomains"
header X-Frame-Options "SAMEORIGIN"
header X-Content-Type-Options "nosniff"
header Content-Security-Policy "default-src https: 'unsafe-inline' 'unsafe-eval';media-src blob: https:;worker-src blob: https:"
header Permissions-Policy "geolocation=(self), microphone=()"
header Referrer-Policy "no-referrer"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment