Skip to content

Commit 57574d4

Browse files
authored
Add SESSION_COOKIE_AGE Django setting to base.py setting file (#3552)
Fixes #3529
1 parent 85e609f commit 57574d4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/setup/administrators/configuration.md

+7
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ The corrosponding locale dir is named: en, en_GB, en_US
5353

5454
PASSWORD_PAGE_TIMEOUT = env.int('PASSWORD_PAGE_TIMEOUT', 120)
5555

56+
### The age of session cookies, in seconds.
57+
58+
This determines the length of time for which the user will remain logged in. The default value is 2 weeks.
59+
60+
SESSION_COOKIE_AGE = env.int('SESSION_COOKIE_AGE', 60 * 60 * 24 * 7 * 2)
61+
62+
5663

5764
## Hypha custom settings
5865

hypha/settings/base.py

+5
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@
374374
BASIC_AUTH_WHITELISTED_HTTP_HOSTS = env.list('BASIC_AUTH_WHITELISTED_HTTP_HOSTS', [])
375375
BASIC_AUTH_WHITELISTED_IP_NETWORKS = env.list('BASIC_AUTH_WHITELISTED_IP_NETWORKS', [])
376376

377+
# Sessions
378+
# https://docs.djangoproject.com/en/stable/ref/settings/#sessions
379+
380+
# The age of session cookies, in seconds.
381+
SESSION_COOKIE_AGE = env.int('SESSION_COOKIE_AGE', 60 * 60 * 24 * 7 * 2) # 2 weeks
377382

378383
# This is used by Wagtail's email notifications for constructing absolute URLs.
379384
PRIMARY_HOST = env.str('PRIMARY_HOST', None)

0 commit comments

Comments
 (0)