aboutsummaryrefslogtreecommitdiff
path: root/src/api/admin.rs
diff options
context:
space:
mode:
authorNils Mittler <[email protected]>2023-02-20 16:10:30 +0100
committerDaniel GarcĂ­a <[email protected]>2023-02-21 21:37:24 +0100
commit2bb41367bca49329c2ece74096e50fc9a422039d (patch)
treefcc96da86a917fc1e972150ef5c2bb9ace70c75c /src/api/admin.rs
parent20d8886bfadf8c014d3a82be410e7a3a92088bbf (diff)
downloadvaultwarden-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.rs2
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();