From 5728a96f740089996a3ee687839ba6ba37530453 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 9 Feb 2013 19:35:11 +0000 Subject: [PATCH] https context --- etc/nginx/pandora | 1 + pandora/settings.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/etc/nginx/pandora b/etc/nginx/pandora index efc99a3a..c0179afe 100644 --- a/etc/nginx/pandora +++ b/etc/nginx/pandora @@ -36,6 +36,7 @@ server { location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto http; proxy_set_header Host $http_host; proxy_redirect off; proxy_read_timeout 90; #should be in sync with gunicorn timeout diff --git a/pandora/settings.py b/pandora/settings.py index 1021c95d..4a684ee0 100644 --- a/pandora/settings.py +++ b/pandora/settings.py @@ -39,6 +39,11 @@ SITE_ID = 1 USE_I18N = True APPEND_SLASH = False +# Uncomment this if you add https support. +# Also make sue to send https from your https vhost: +# proxy_set_header X-Forwarded-Proto https; +#SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = normpath(join(PROJECT_ROOT, '..', 'data'))