feat: use redirect temporary

This commit is contained in:
Fu Zi Xiang 2023-10-11 16:18:29 +08:00
parent 31d1be2469
commit 66ac3adb16
No known key found for this signature in database
GPG Key ID: 7AE0884D237CEE16
1 changed files with 3 additions and 3 deletions

View File

@ -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(),
}
}
}