We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79f5b46 commit b11e63dCopy full SHA for b11e63d
1 file changed
rootfs/api/settings/production.py
@@ -26,6 +26,7 @@
26
'security.W004',
27
'security.W008',
28
'security.W012',
29
+ 'security.W016',
30
]
31
32
CONN_MAX_AGE = 60 * 3
@@ -139,12 +140,13 @@
139
140
)
141
142
X_FRAME_OPTIONS = 'DENY'
-CSRF_COOKIE_SECURE = True
143
CSRF_COOKIE_HTTPONLY = False
144
CSRF_COOKIE_SAMESITE = None
145
-SESSION_COOKIE_SECURE = False
146
SECURE_CONTENT_TYPE_NOSNIFF = True
147
SECURE_BROWSER_XSS_FILTER = True
+SESSION_COOKIE_SECURE = bool(strtobool(os.environ.get('SESSION_COOKIE_SECURE', 'false')))
148
+CSRF_COOKIE_SECURE = bool(strtobool(os.environ.get('CSRF_COOKIE_SECURE', 'false')))
149
+
150
151
# Honor HTTPS from a trusted proxy
152
# see https://docs.djangoproject.com/en/1.11/ref/settings/#secure-proxy-ssl-header
0 commit comments