diff options
author | Nils Mittler <[email protected]> | 2023-02-20 16:10:30 +0100 |
---|---|---|
committer | Daniel GarcĂa <[email protected]> | 2023-02-21 21:37:24 +0100 |
commit | 2bb41367bca49329c2ece74096e50fc9a422039d (patch) | |
tree | fcc96da86a917fc1e972150ef5c2bb9ace70c75c /src/api/admin.rs | |
parent | 20d8886bfadf8c014d3a82be410e7a3a92088bbf (diff) | |
download | vaultwarden-2bb41367bca49329c2ece74096e50fc9a422039d.tar.gz vaultwarden-2bb41367bca49329c2ece74096e50fc9a422039d.zip |
Make the admin cookie lifetime adjustable
Diffstat (limited to 'src/api/admin.rs')
-rw-r--r-- | src/api/admin.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/admin.rs b/src/api/admin.rs index f791d779..92c8e3b8 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -184,7 +184,7 @@ fn post_admin_login(data: Form<LoginForm>, cookies: &CookieJar<'_>, ip: ClientIp let cookie = Cookie::build(COOKIE_NAME, jwt) .path(admin_path()) - .max_age(rocket::time::Duration::minutes(20)) + .max_age(rocket::time::Duration::minutes(CONFIG.admin_cookie_lifetime())) .same_site(SameSite::Strict) .http_only(true) .finish(); |