Fix nginx caching for customize.js resource

This commit is contained in:
Mononaut 2024-05-13 16:57:14 +00:00
parent 947f55dda2
commit 1cdb38af0b
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
2 changed files with 10 additions and 0 deletions

View File

@ -27,6 +27,11 @@
try_files $uri =404;
expires 5m;
}
# only cache /resources/customize.* for 5 minutes since it changes often
location /resources/customize. {
try_files $uri =404;
expires 5m;
}
location @index-redirect {
rewrite (.*) /$lang/index.html;

View File

@ -90,6 +90,11 @@ location /resources/config. {
try_files $uri =404;
expires 5m;
}
# only cache /resources/customize.* for 5 minutes since it changes often
location /resources/customize. {
try_files $uri =404;
expires 5m;
}
# cache /main.f40e91d908a068a2.js forever since they never change
location ~* ^/.+\..+\.(js|css)$ {