Fix admin login 500 when clients omit the trailing slash.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Shayan Azadi
2026-08-17 18:49:15 +03:30
parent 26b83dabac
commit e8423facaa
5 changed files with 66 additions and 9 deletions

View File

@@ -25,7 +25,10 @@ DJANGO_PORT=8000
# CORS Settings (comma-separated origins)
# Example: CORS_ALLOWED_ORIGINS=http://YOUR_SERVER_IP:9123,https://your-frontend.com
CORS_ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000
CORS_ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000,https://panel.zoneco.org,https://zoneco.org,https://www.zoneco.org
# HTTPS origins trusted for CSRF (needed behind nginx / Arvan)
CSRF_TRUSTED_ORIGINS=https://zoneco.org,https://www.zoneco.org,https://panel.zoneco.org
# Admin bootstrap (used by Docker entrypoint on server)
# Leave empty locally if you create the user manually