Update settings.py

This is needed for LB (e.g., traefik) for proxying into nginx
otherwise, get CSRF error
ref: https://stackoverflow.com/questions/27533011/django-csrf-error-casused-by-nginx-x-forwarded-host

resolved by adding USE_X_FORWARDED_HOST using the following similar issue as a reference:
https://github.com/catmaid/CATMAID/issues/1781
This commit is contained in:
lj020326
2020-03-30 16:27:40 -04:00
committed by GitHub
parent 827adbce76
commit 65e38aa37d

View File

@@ -85,4 +85,5 @@ DATABASES = {
if os.getenv("DATABASE_SSLMODE", False):
DATABASES['default']['OPTIONS'] = {'sslmode': os.getenv("DATABASE_SSLMODE")}
USE_X_FORWARDED_HOST = True
USE_X_FORWARDED_PORT = True