Skip to content

Commit 2fe6c7d

Browse files
committed
Hosted the website on nomz.dpdns.org
1 parent 8ee7449 commit 2fe6c7d

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)