feat: added cache for css

This commit is contained in:
Leyla Becker 2026-02-11 16:08:51 -06:00
parent a7676d06b6
commit 642ee3b45a
3 changed files with 93 additions and 3 deletions

View file

@ -20,6 +20,14 @@
locations."/" = {
tryFiles = "$uri $uri/ /index.html";
};
# Cache static assets (CSS, JS, images) for 1 year with immutable
locations."~* \\.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$" = {
extraConfig = ''
expires 1y;
add_header Cache-Control "public, max-age=31536000, immutable";
access_log off;
'';
};
};
in {
options.services.volpe = {