diff --git a/etc/nginx/pandora b/etc/nginx/pandora index efc99a3af..c0179afe7 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 1021c95d8..4a684ee0b 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'))