Skip to content

Commit fac40ed

Browse files
committed
Merge remote-tracking branch 'origin/develop' into ci/cd
2 parents e1dfcaf + a1b9f2c commit fac40ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

restaurants/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@
206206
if not DEBUG:
207207
# EB terminates SSL at the load balancer; redirect at Django level causes loops
208208
# Django receives HTTP from load balancer, so cookies must work over HTTP
209-
SECURE_SSL_REDIRECT = False
209+
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
210+
SECURE_SSL_REDIRECT = True
211+
210212
SESSION_COOKIE_SECURE = False # Allow cookies over HTTP (load balancer handles HTTPS)
211213
CSRF_COOKIE_SECURE = False # Allow CSRF cookies over HTTP (load balancer handles HTTPS)
212214
CSRF_COOKIE_HTTPONLY = False # Allow form to read CSRF token

0 commit comments

Comments
 (0)