Update nginx cache settings for the frontend config files
This commit is contained in:
parent
3e41e512ad
commit
81d35d9401
@ -21,6 +21,13 @@
|
|||||||
try_files $uri @index-redirect;
|
try_files $uri @index-redirect;
|
||||||
expires 1h;
|
expires 1h;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# only cache /resources/config.* for 5 minutes since it changes often
|
||||||
|
location /resources/config. {
|
||||||
|
try_files $uri =404;
|
||||||
|
expires 5m;
|
||||||
|
}
|
||||||
|
|
||||||
location @index-redirect {
|
location @index-redirect {
|
||||||
rewrite (.*) /$lang/index.html;
|
rewrite (.*) /$lang/index.html;
|
||||||
}
|
}
|
||||||
|
@ -81,6 +81,13 @@ location /resources {
|
|||||||
try_files $uri /en-US/index.html;
|
try_files $uri /en-US/index.html;
|
||||||
expires 1w;
|
expires 1w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# only cache /resources/config.* for 5 minutes since it changes often
|
||||||
|
location /resources/config. {
|
||||||
|
try_files $uri =404;
|
||||||
|
expires 5m;
|
||||||
|
}
|
||||||
|
|
||||||
# cache /main.f40e91d908a068a2.js forever since they never change
|
# cache /main.f40e91d908a068a2.js forever since they never change
|
||||||
location ~* ^/.+\..+\.(js|css) {
|
location ~* ^/.+\..+\.(js|css) {
|
||||||
try_files /$lang/$uri /en-US/$uri =404;
|
try_files /$lang/$uri /en-US/$uri =404;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user