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/