Last active
June 27, 2024 15:26
-
-
Save johannschopplich/31db2af85c3f0c334e4974b40b2a3d80 to your computer and use it in GitHub Desktop.
Custom nginx caching headers for Ploi.io for Kirby CMS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assets and media | |
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|heic|webp|svgz?|mp3|m4a|aac|ogg|wav|mp4|mov|webm|mpe?g|avi|ogv|wmv|woff2?)$ { | |
try_files $uri $uri/ /index.php?$query_string; | |
add_header Cache-Control "public, max-age=31536000, immutable"; | |
access_log off; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment