Skip to content

Commit

Permalink
session config
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Sep 14, 2023
1 parent 5bd781a commit 393eb70
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion backend/service/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

# Authentication backend classes
# Authentication backends
# https://docs.djangoproject.com/en/4.2/ref/settings/#authentication-backends

AUTHENTICATION_BACKENDS = [
Expand All @@ -141,6 +141,15 @@
"api.auth_backends.UsernameAndPasswordAndClassIdBackend",
]

# Sessions
# https://docs.djangoproject.com/en/3.2/topics/http/sessions/

SESSION_COOKIE_AGE = 60 * 60
SESSION_SAVE_EVERY_REQUEST = True
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_SAMESITE = "None"
SESSION_COOKIE_DOMAIN = "codeforlife.education"

# ------------------------------------------------------------------------------
# Custom
Expand Down

0 comments on commit 393eb70

Please sign in to comment.