CSRF_COOKIE_SECURE and SESSION_COOKIE_SECURE to True when terminating SSL on load balancer
298 views
Skip to first unread message
pjotr
unread,
Sep 7, 2016, 7:15:16 AM9/7/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hi,
I use HAProxy as load balancer, where I also terminate the SSL. The traffic between HAProxy and the is unencrypted. I have force SSL enabled, so all requests with http will be redirected to https.
Question is, does it serve any good to have CSRF_COOKIE_SECURE and SESSION_COOKIE_SECURE set to True in settings? It doesn't make sense for me, but there might be some other reasons for using that!?
/Peter
Camilo Torres
unread,
Sep 7, 2016, 10:40:25 AM9/7/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hi.
As you are currently using HTTPS, setting these to true make sense.
These settings are used by the browser to ensure encripted cookies. It does not matter if you are using haproxy with ssl termination.