feat: Add better cache for stati elements
Some checks failed
Build, check & Test / run (pull_request) Failing after 1m44s

This commit is contained in:
Florian Bouillon 2023-08-15 23:46:32 +00:00
parent 86e60516f9
commit 9a073eba97

View File

@ -28,7 +28,7 @@ http {
} }
# Plausible script # Plausible script
location /js/index.js { location /js/script.js {
# Change this if you use a different variant of the script # Change this if you use a different variant of the script
proxy_pass https://plausible.io/js/script.js; proxy_pass https://plausible.io/js/script.js;
proxy_set_header Host plausible.io; proxy_set_header Host plausible.io;
@ -48,5 +48,17 @@ http {
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Host $host;
} }
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webp|webm|htc|woff2|woff)$ {
expires 1y;
access_log off;
}
# CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
}
} }
} }