From f689d710a5f1ac948bb66750a015ce7bda695ba7 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 5 Jan 2026 03:06:23 +0300 Subject: [PATCH] fix --- nginx.conf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nginx.conf b/nginx.conf index 53612b5..e32f3b4 100644 --- a/nginx.conf +++ b/nginx.conf @@ -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; }