diff --git a/docker/nginx/conf.d/default.conf b/docker/nginx/conf.d/default.conf index 3a0a869..baffc3b 100644 --- a/docker/nginx/conf.d/default.conf +++ b/docker/nginx/conf.d/default.conf @@ -5,23 +5,17 @@ server { root /usr/share/nginx/html; index index.html; - # Добавляем заголовки для SPA - add_header X-Frame-Options "SAMEORIGIN"; - add_header X-XSS-Protection "1; mode=block"; - add_header X-Content-Type-Options "nosniff"; - - # Обработка всех маршрутов фронтенда + # Основной маршрут для статических файлов location / { try_files $uri $uri/ /index.html; - expires -1; - add_header Cache-Control "no-store, no-cache, must-revalidate"; + add_header Cache-Control "no-cache, no-store, must-revalidate"; } - # Явно указываем маршрут для админки + # Маршрут для админ-панели location /admin { + alias /usr/share/nginx/html; try_files $uri $uri/ /index.html; - expires -1; - add_header Cache-Control "no-store, no-cache, must-revalidate"; + add_header Cache-Control "no-cache, no-store, must-revalidate"; } # API прокси @@ -39,8 +33,4 @@ server { # Обработка ошибок error_page 404 /index.html; - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } }