1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

не факт что заработает)

This commit is contained in:
1
2024-12-25 13:29:06 +06:00
parent ec177c9cce
commit 9fc51e9eac
3 changed files with 22 additions and 46 deletions

View File

@@ -5,20 +5,7 @@ server {
root /usr/share/nginx/html;
index index.html;
# Основной маршрут для статических файлов
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# Маршрут для админ-панели
location /admin {
alias /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# API прокси
# Важно: этот блок должен быть перед location /
location /api/ {
proxy_pass http://backend:8000/api/;
proxy_http_version 1.1;
@@ -31,6 +18,11 @@ server {
proxy_read_timeout 60s;
}
# Обработка ошибок
error_page 404 /index.html;
}
# Обработка всех остальных маршрутов
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
}
}