From 66ac3adb16617f9ce60acfebf1351aec31678cae Mon Sep 17 00:00:00 2001 From: Fu Zi Xiang Date: Wed, 11 Oct 2023 16:18:29 +0800 Subject: [PATCH] feat: use redirect temporary --- admin_frontend/src/session.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin_frontend/src/session.rs b/admin_frontend/src/session.rs index 9bea1925..37aef112 100644 --- a/admin_frontend/src/session.rs +++ b/admin_frontend/src/session.rs @@ -113,12 +113,12 @@ pub enum SessionRejection { impl IntoResponse for SessionRejection { fn into_response(self) -> axum::response::Response { match self { - SessionRejection::NoSessionId => Redirect::permanent("/web/login").into_response(), + SessionRejection::NoSessionId => Redirect::temporary("/web/login").into_response(), SessionRejection::CookieError(err) => { tracing::error!("session rejection cookie error: {}", err); - Redirect::permanent("/web/login").into_response() + Redirect::temporary("/web/login").into_response() }, - SessionRejection::SessionNotFound => Redirect::permanent("/web/login").into_response(), + SessionRejection::SessionNotFound => Redirect::temporary("/web/login").into_response(), } } }