Skip to content

Commit

Permalink
Disable SESSION_COOKIE_DOMAIN in local environment
Browse files Browse the repository at this point in the history
  • Loading branch information
niccolomineo committed Sep 12, 2024
1 parent 7982a0b commit 79df850
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion {{cookiecutter.project_dirname}}/.env_template
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ DJANGO_DEBUG=True
DJANGO_DEFAULT_FROM_EMAIL=info@example.org
DJANGO_SECRET_KEY=__SECRETKEY__
DJANGO_SERVER_EMAIL=server@example.org
DJANGO_SESSION_COOKIE_DOMAIN=localhost
DJANGO_SUPERUSER_EMAIL=info@example.org
DJANGO_SUPERUSER_PASSWORD={{ cookiecutter.project_slug }}
DJANGO_SUPERUSER_USERNAME=${USER}
Expand Down
1 change: 0 additions & 1 deletion {{cookiecutter.project_dirname}}/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ services:
- DJANGO_DEFAULT_FROM_EMAIL
- DJANGO_SECRET_KEY
- DJANGO_SERVER_EMAIL
- DJANGO_SESSION_COOKIE_DOMAIN
- DJANGO_SUPERUSER_EMAIL
- DJANGO_SUPERUSER_PASSWORD
- DJANGO_SUPERUSER_USERNAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class ProjectDefault(Configuration):
# Session auth
# https://docs.djangoproject.com/en/stable/ref/settings/#sessions

SESSION_COOKIE_DOMAIN = values.Value()
SESSION_COOKIE_DOMAIN = None

SESSION_COOKIE_SECURE = True

Expand Down Expand Up @@ -392,6 +392,11 @@ def DATABASES(self): # pragma: no cover

X_FRAME_OPTIONS = "DENY"

# Session auth
# https://docs.djangoproject.com/en/stable/ref/settings/#sessions

SESSION_COOKIE_DOMAIN = values.Value()

# Persistent connections
# https://docs.djangoproject.com/en/stable/ref/databases/#general-notes

Expand Down

0 comments on commit 79df850

Please sign in to comment.