Created
February 25, 2016 00:55
-
-
Save ncole458/c139ea983790ce114246 to your computer and use it in GitHub Desktop.
Django & Nginx w/Gunicorn full https
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Forward all to https for Django / DRF viewsets | |
# settings.py | |
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') | |
# Nginx location header (see also http://nginx.org/en/docs/http/configuring_https_servers.html) | |
location / { | |
# ... | |
proxy_set_header X-Forwarded-Protocol $scheme; | |
# ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment