Enhancement: allow setting session cookie age (#7743)

This commit is contained in:
shamoon
2024-09-19 18:58:40 -07:00
committed by GitHub
parent 97030a807f
commit a440c88b81
2 changed files with 11 additions and 1 deletions

View File

@@ -472,7 +472,10 @@ ACCOUNT_EMAIL_VERIFICATION = os.getenv(
"optional",
)
ACCOUNT_SESSION_REMEMBER = __get_boolean("PAPERLESS_ACCOUNT_SESSION_REMEMBER")
ACCOUNT_SESSION_REMEMBER = __get_boolean("PAPERLESS_ACCOUNT_SESSION_REMEMBER", "True")
SESSION_COOKIE_AGE = int(
os.getenv("PAPERLESS_SESSION_COOKIE_AGE", 60 * 60 * 24 * 7 * 3),
)
if AUTO_LOGIN_USERNAME:
_index = MIDDLEWARE.index("django.contrib.auth.middleware.AuthenticationMiddleware")