This commit is contained in:
Dmitry 2026-01-05 03:06:23 +03:00
parent a92f318b97
commit f689d710a5

View file

@ -21,15 +21,14 @@ server {
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
# Кэширование статических ресурсов (должен быть перед location /)
# Кэширование статических ресурсов (regex location имеет приоритет)
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
try_files $uri =404;
access_log off;
expires 1y;
add_header Cache-Control "public, immutable" always;
add_header Cache-Control "public, immutable";
access_log off;
}
# SPA routing support - все запросы направляются на index.html
# SPA routing support - все остальные запросы направляются на index.html
location / {
try_files $uri $uri/ /index.html;
}