Skip to content

Commit

Permalink
Add SESSION_COOKIE_AGE Django setting to base.py setting file (#3552)
Browse files Browse the repository at this point in the history
Fixes #3529
  • Loading branch information
theskumar authored Sep 8, 2023
1 parent 85e609f commit 57574d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/setup/administrators/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ The corrosponding locale dir is named: en, en_GB, en_US

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

### The age of session cookies, in seconds.

This determines the length of time for which the user will remain logged in. The default value is 2 weeks.

SESSION_COOKIE_AGE = env.int('SESSION_COOKIE_AGE', 60 * 60 * 24 * 7 * 2)



## Hypha custom settings

Expand Down
5 changes: 5 additions & 0 deletions hypha/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,11 @@
BASIC_AUTH_WHITELISTED_HTTP_HOSTS = env.list('BASIC_AUTH_WHITELISTED_HTTP_HOSTS', [])
BASIC_AUTH_WHITELISTED_IP_NETWORKS = env.list('BASIC_AUTH_WHITELISTED_IP_NETWORKS', [])

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

# The age of session cookies, in seconds.
SESSION_COOKIE_AGE = env.int('SESSION_COOKIE_AGE', 60 * 60 * 24 * 7 * 2) # 2 weeks

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

0 comments on commit 57574d4

Please sign in to comment.