We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ee7449 commit 2fe6c7dCopy full SHA for 2fe6c7d
restaurants/settings.py
@@ -206,7 +206,9 @@
206
if not DEBUG:
207
# EB terminates SSL at the load balancer; redirect at Django level causes loops
208
# Django receives HTTP from load balancer, so cookies must work over HTTP
209
- SECURE_SSL_REDIRECT = False
+ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
210
+ SECURE_SSL_REDIRECT = True
211
+
212
SESSION_COOKIE_SECURE = False # Allow cookies over HTTP (load balancer handles HTTPS)
213
CSRF_COOKIE_SECURE = False # Allow CSRF cookies over HTTP (load balancer handles HTTPS)
214
CSRF_COOKIE_HTTPONLY = False # Allow form to read CSRF token
0 commit comments