Store cookies securely

This commit is contained in:
Jake Howard 2022-08-25 23:16:20 +01:00
parent fb739f93fc
commit a4471a49ee
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -277,6 +277,11 @@ SECURE_CONTENT_TYPE_NOSNIFF = True
X_FRAME_OPTIONS = "DENY" X_FRAME_OPTIONS = "DENY"
SECURE_REFERRER_POLICY = "same-origin" SECURE_REFERRER_POLICY = "same-origin"
SESSION_COOKIE_SECURE = not DEBUG
CSRF_COOKIE_SECURE = not DEBUG
CSRF_COOKIE_HTTPONLY = True
SESSION_COOKIE_HTTPONLY = True
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
if not DEBUG: if not DEBUG: