26 lines
598 B
Caddyfile
26 lines
598 B
Caddyfile
:8088 {
|
|
root * /srv
|
|
|
|
# Enable gzip compression
|
|
encode gzip
|
|
|
|
# Handle client-side routing - try file, then index.html
|
|
try_files {path} /index.html
|
|
|
|
# Serve static files
|
|
file_server
|
|
|
|
# Cache static assets
|
|
@static {
|
|
path *.js *.css *.png *.jpg *.jpeg *.gif *.ico *.svg *.woff *.woff2 *.ttf *.eot
|
|
}
|
|
header @static Cache-Control "public, max-age=31536000, immutable"
|
|
|
|
# Security headers
|
|
header {
|
|
X-Frame-Options "SAMEORIGIN"
|
|
X-Content-Type-Options "nosniff"
|
|
X-XSS-Protection "1; mode=block"
|
|
}
|
|
}
|