From 9607998bb5d166958c8b2001cb12afeed48a1314 Mon Sep 17 00:00:00 2001 From: Thomas NOEL Date: Tue, 17 Sep 2013 12:58:05 +0200 Subject: [PATCH] https when X-Forwarded-Protocol==https --- univcloud/settings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/univcloud/settings.py b/univcloud/settings.py index aeac299..bcfd118 100644 --- a/univcloud/settings.py +++ b/univcloud/settings.py @@ -20,6 +20,11 @@ DATABASES = { } } +# the proxy can add a custom HTTP header that tells Django whether the request +# came in via HTTPS +# https://docs.djangoproject.com/en/1.4/ref/settings/#secure-proxy-ssl-header +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') + # Hosts/domain names that are valid for this site; required if DEBUG is False # See https://docs.djangoproject.com/en/1.4/ref/settings/#allowed-hosts ALLOWED_HOSTS = []