fix: update Nginx configuration to enforce trailing slashes for admin and API endpoints
All checks were successful
Deploy on Push to Main / deploy (push) Successful in 42s

This commit is contained in:
2025-11-30 09:50:56 +01:00
parent bf5c2ad292
commit 3381789841

View File

@@ -30,14 +30,6 @@ http {
listen 7080;
server_name localhost;
location = /mayo-manager/admin {
return 301 /mayo-manager/admin/;
}
location = /mayo-manager/api {
return 301 /mayo-manager/api/;
}
# Serwowanie statycznych plików Django Admina
location /mayo-manager/static/ {
alias /static_django/;
@@ -50,7 +42,10 @@ http {
}
# Proxy do API Django
location /mayo-manager/api/ {
location ~ ^/mayo-manager/api/?$ {
if ($request_uri !~ /$) {
return 301 $request_uri/;
}
proxy_pass http://mayo-production-manager-backend:7090/mayo-manager/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@@ -59,7 +54,10 @@ http {
}
# Proxy do panelu admina Django
location /mayo-manager/admin/ {
location ~ ^/mayo-manager/admin/?$ {
if ($request_uri !~ /$) {
return 301 $request_uri/;
}
proxy_pass http://mayo-production-manager-backend:7090/mayo-manager/admin/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;