Skip to content

Commit

Permalink
Make the login redirection temporary
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Apr 3, 2024
1 parent 68cd286 commit ff670b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/agama-server/src/web/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use axum::{
extract::{Query, State},
http::{
header::{LOCATION, SET_COOKIE},
HeaderMap, StatusCode,
HeaderMap, HeaderValue, StatusCode,
},
response::IntoResponse,
Json,
Expand Down Expand Up @@ -95,8 +95,8 @@ pub async fn login_from_query(
);
}

headers.insert(LOCATION, "/".parse().unwrap());
(StatusCode::PERMANENT_REDIRECT, headers)
headers.insert(LOCATION, HeaderValue::from_static("/"));
(StatusCode::TEMPORARY_REDIRECT, headers)
}

#[utoipa::path(delete, path = "/api/auth", responses(
Expand Down

0 comments on commit ff670b0

Please sign in to comment.