Update settings.py (#284)

Add CSRF_TRUSTED_ORIGINS Django config settings and set it to environment variable TA_HOST.
This should fix login issues behind reverse proxies.
This commit is contained in:
Aron Brown 2022-07-30 10:03:58 -04:00 committed by GitHub
parent 36560735f2
commit 5407d35779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ SECRET_KEY = PW_HASH.hexdigest()
DEBUG = bool(environ.get("DJANGO_DEBUG"))
ALLOWED_HOSTS = [i.strip() for i in environ.get("TA_HOST").split()]
CSRF_TRUSTED_ORIGINS = [i.strip() for i in environ.get("TA_HOST").split()]
# Application definition