fix
This commit is contained in:
parent
1de38f40cc
commit
a92f318b97
1 changed files with 3 additions and 9 deletions
12
nginx.conf
12
nginx.conf
|
|
@ -24,18 +24,12 @@ server {
|
||||||
# Кэширование статических ресурсов (должен быть перед location /)
|
# Кэширование статических ресурсов (должен быть перед location /)
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
|
access_log off;
|
||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control "public, immutable";
|
add_header Cache-Control "public, immutable" always;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Не кэшируем HTML
|
# SPA routing support - все запросы направляются на index.html
|
||||||
location ~* \.html$ {
|
|
||||||
try_files $uri =404;
|
|
||||||
expires -1;
|
|
||||||
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
|
|
||||||
}
|
|
||||||
|
|
||||||
# SPA routing support - все запросы направляются на index.html (должен быть последним)
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue