Skip to content

Commit fd3334e

Browse files
config: ⚙ Change caching rules
1 parent 024feb7 commit fd3334e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

example.nginx

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ server {
1919

2020
rewrite ^/(?!.*api)(?!.*\.).*$ /index.html;
2121

22-
expires 30d;
23-
add_header Cache-Control "public, no-transform";
24-
2522
location / {
2623
index index.html;
24+
expires 30d;
25+
add_header Cache-Control "public, no-transform";
2726
}
2827

2928
location ~ \.(css|js|html) {
3029
try_files $uri =404;
30+
expires 30d;
31+
add_header Cache-Control "public, no-transform";
3132
}
3233

3334
location ^~ /.well-known/ {
@@ -47,7 +48,6 @@ server {
4748
etag off;
4849
}
4950

50-
5151
# ssl_certificate /etc/letsencrypt/live/example.tld/fullchain.pem;
5252
# ssl_certificate_key /etc/letsencrypt/live/example.tld/privkey.pem;
5353
}

0 commit comments

Comments
 (0)