Skip to content

Commit 9adb35a

Browse files
add commented out security settings if using docker
1 parent e384302 commit 9adb35a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

{{cookiecutter.project_slug}}/config/settings/production.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,22 @@
4444
# ------------------------------------------------------------------------------
4545
{% if cookiecutter.use_docker -%}
4646
# NOTE headers are managed by the security-headers middleware in traefik.yml
47+
# Uncomment the following if you are not using Traefik
48+
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-ssl-redirect
49+
# SECURE_SSL_REDIRECT = env.bool("DJANGO_SECURE_SSL_REDIRECT", default=True)
50+
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-seconds
51+
# TODO increase this to *at least* 31536000 (1 year) once HTTPS works
52+
# SECURE_HSTS_SECONDS = 60
53+
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-include-subdomains
54+
# SECURE_HSTS_INCLUDE_SUBDOMAINS = env.bool(
55+
# "DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS", default=True
56+
# )
57+
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-preload
58+
# SECURE_HSTS_PRELOAD = env.bool("DJANGO_SECURE_HSTS_PRELOAD", default=True)
59+
# https://docs.djangoproject.com/en/dev/ref/middleware/#x-content-type-options-nosniff
60+
# SECURE_CONTENT_TYPE_NOSNIFF = env.bool(
61+
# "DJANGO_SECURE_CONTENT_TYPE_NOSNIFF", default=True
62+
# )
4763
{% else -%}
4864
# TODO set security headers in your load balancer if possible and remove these
4965
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-ssl-redirect

0 commit comments

Comments
 (0)