Skip to content

Commit 22f324e

Browse files
authored
PPHA-682: Implement preload and subdomains for HSTS (#415)
# What is the change? Implement preload and subdomains for HSTS # Why are we making this change? To ensure our HSTS implementation complies with accepted standards
2 parents 0583ea8 + 480f491 commit 22f324e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lung_cancer_screening/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ def pem_key_env(key, file_path_key=None):
289289
# Additional security settings for production
290290
if not DEBUG:
291291
SECURE_HSTS_SECONDS = 31536000
292+
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
293+
SECURE_HSTS_PRELOAD = True
292294
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
293295
SECURE_SSL_REDIRECT = False
294296
SESSION_COOKIE_SECURE = True

0 commit comments

Comments
 (0)