16 lines
530 B
ApacheConf
16 lines
530 B
ApacheConf
# Cache static assets
|
|
<FilesMatch "\.(jpg|jpeg|png|gif|svg|webp|ico|css|js|woff|woff2|ttf|eot)$">
|
|
Header set Cache-Control "public, max-age=31536000, immutable"
|
|
</FilesMatch>
|
|
|
|
# Cache HTML with short lifetime
|
|
<FilesMatch "\.(html|htm)$">
|
|
Header set Cache-Control "public, max-age=3600, must-revalidate"
|
|
</FilesMatch>
|
|
|
|
# Security headers
|
|
Header set X-Content-Type-Options "nosniff"
|
|
Header set X-Frame-Options "SAMEORIGIN"
|
|
Header set X-XSS-Protection "1; mode=block"
|
|
Header set Referrer-Policy "strict-origin-when-cross-origin"
|