feat: added cache for css
This commit is contained in:
parent
a7676d06b6
commit
642ee3b45a
3 changed files with 93 additions and 3 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue