fix: add CSRF_TRUSTED_ORIGINS support via env var
This commit is contained in:
@@ -30,6 +30,10 @@ DEBUG = (os.environ.get("DEBUG", default=False).lower() == 'true')
|
||||
|
||||
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS').split(' ')
|
||||
|
||||
# CSRF trusted origins — required when behind a reverse proxy with HTTPS
|
||||
_csrf_origins = os.environ.get('CSRF_TRUSTED_ORIGINS', '')
|
||||
CSRF_TRUSTED_ORIGINS = [o.strip() for o in _csrf_origins.split(',') if o.strip()]
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
|
||||
Reference in New Issue
Block a user