Skip to content

Commit c9d67c3

Browse files
add commented out security settings if using docker
1 parent 0c7cc38 commit c9d67c3

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

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

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

0 commit comments

Comments
 (0)