Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1561] make admin session cookie age configurable #711

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/open_inwoner/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@
SESSION_COOKIE_NAME = "open_inwoner_sessionid"
SESSION_ENGINE = "django.contrib.sessions.backends.cache"

ADMIN_SESSION_COOKIE_AGE = 3600 # Set to 1 hour max session duration for admins
ADMIN_SESSION_COOKIE_AGE = config(
"ADMIN_SESSION_COOKIE_AGE", 3600
) # Default 1 hour max session duration for admins
SESSION_WARN_DELTA = 60 # Warn 1 minute before end of session.
SESSION_COOKIE_AGE = 900 # Set to 15 minutes

Expand Down
2 changes: 0 additions & 2 deletions src/open_inwoner/extended_sessions/middleware.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from datetime import timedelta

from django.conf import settings

SESSION_EXPIRES_IN_HEADER = "X-Session-Expires-In"
Expand Down