diff --git a/src/api/admin.rs b/src/api/admin.rs index e4a8d95fb6b..4df77748930 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -316,7 +316,7 @@ async fn test_smtp(data: Json, _token: AdminToken) -> EmptyResult { #[get("/logout")] fn logout(cookies: &CookieJar<'_>) -> Redirect { - cookies.remove(Cookie::build(COOKIE_NAME, "").path(admin_path()).finish()); + cookies.remove(Cookie::build(COOKIE_NAME).path(admin_path())); Redirect::to(admin_path()) } @@ -797,7 +797,7 @@ impl<'r> FromRequest<'r> for AdminToken { if decode_admin(access_token).is_err() { // Remove admin cookie - cookies.remove(Cookie::build(COOKIE_NAME, "").path(admin_path()).finish()); + cookies.remove(Cookie::build(COOKIE_NAME).path(admin_path())); error!("Invalid or expired admin JWT. IP: {}.", &ip.ip); return Outcome::Error((Status::Unauthorized, "Session expired")); }