fix: update SSL redirect setting and adjust API paths in Nginx and Django settings

This commit is contained in:
2025-11-30 08:39:28 +01:00
parent 109761ea94
commit 70ad13e0e9
4 changed files with 4 additions and 5 deletions

View File

@@ -128,7 +128,7 @@ STATIC_ROOT = BASE_DIR / "staticfiles"
USE_X_FORWARDED_HOST = True
USE_X_FORWARDED_PORT = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True
SECURE_SSL_REDIRECT = False
# CSRF Trusted Origins

View File

@@ -18,5 +18,5 @@ from django.contrib import admin
from django.urls import path
urlpatterns = [
path('admin/', admin.site.urls),
path('mayo-manager/admin/', admin.site.urls),
]

View File

@@ -7,7 +7,6 @@ services:
env_file:
- ./backand/.env
environment:
- HOSTS=bartool.ovh,localhost
- CSRF_TRUSTED_ORIGINS=https://bartool.ovh
- NODE_ENV=production
volumes:

View File

@@ -43,7 +43,7 @@ http {
# Proxy do API Django
location /mayo-manager/api/ {
proxy_pass http://mayo-production-manager-backend:7090/api/;
proxy_pass http://mayo-production-manager-backend:7090/mayo-manager/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -52,7 +52,7 @@ http {
# Proxy do panelu admina Django
location /mayo-manager/admin/ {
proxy_pass http://mayo-production-manager-backend:7090/admin/;
proxy_pass http://mayo-production-manager-backend:7090/mayo-manager/admin/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;