From 6e565698557923f37946f6f56007b66c8a04cede Mon Sep 17 00:00:00 2001 From: Priyav Kaneria Date: Wed, 4 Oct 2023 13:01:36 +0530 Subject: [PATCH] Toggled secure cookies and csrf settings for debug --- contrihub/settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrihub/settings.py b/contrihub/settings.py index f3b4d47..3b2187b 100644 --- a/contrihub/settings.py +++ b/contrihub/settings.py @@ -116,6 +116,12 @@ if not DEBUG: SECURE_SSL_REDIRECT = True SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") + SESSION_COOKIE_SECURE = True + CSRF_COOKIE_SECURE = True +else: + SECURE_SSL_REDIRECT = False + SESSION_COOKIE_SECURE = False + CSRF_COOKIE_SECURE = False # Internationalization # https://docs.djangoproject.com/en/3.2/topics/i18n/