Skip to content

Instantly share code, notes, and snippets.

@johannschopplich
Last active June 27, 2024 15:26
Show Gist options
  • Save johannschopplich/31db2af85c3f0c334e4974b40b2a3d80 to your computer and use it in GitHub Desktop.
Save johannschopplich/31db2af85c3f0c334e4974b40b2a3d80 to your computer and use it in GitHub Desktop.
Custom nginx caching headers for Ploi.io for Kirby CMS
# 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