From ec177c9cce43aff3ca2c82e9337b5436a49c169f Mon Sep 17 00:00:00 2001 From: 1 Date: Wed, 25 Dec 2024 13:23:06 +0600 Subject: [PATCH] add admin in vue --- docker/nginx/conf.d/default.conf | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) 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; - } }