update
This commit is contained in:
25
Caddyfile
Normal file
25
Caddyfile
Normal file
@@ -0,0 +1,25 @@
|
||||
:80 {
|
||||
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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user