We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e1dfcaf + a1b9f2c commit fac40edCopy full SHA for fac40ed
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