From d7199827da8cdc1c407b1ae57130f272c31740fb Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 25 Sep 2022 21:21:42 +0530 Subject: [PATCH] Fix infinite redirections in production --- gmba_django/settings/production.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gmba_django/settings/production.py b/gmba_django/settings/production.py index 038ece5..13ba57a 100644 --- a/gmba_django/settings/production.py +++ b/gmba_django/settings/production.py @@ -17,6 +17,9 @@ DATABASES = { SECURE_SSL_REDIRECT = True +# See https://docs.djangoproject.com/en/2.2/ref/settings/#secure-proxy-ssl-header +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + SESSION_COOKIE_SECURE = True CSRF_COOKIE_SECURE = True