static dir renamed and cookie auth middleware

This commit is contained in:
realaravinth
2021-05-01 11:28:39 +05:30
parent c96f890236
commit 7058af84d6
72 changed files with 270 additions and 57 deletions

View File

@@ -252,7 +252,7 @@ pub async fn signout(id: Identity) -> impl Responder {
if let Some(_) = id.identity() {
id.forget();
}
HttpResponse::TemporaryRedirect()
HttpResponse::Found()
.set_header(header::LOCATION, "/login")
.body("")
}

View File

@@ -130,7 +130,7 @@ async fn auth_works() {
.to_request(),
)
.await;
assert_eq!(signout_resp.status(), StatusCode::TEMPORARY_REDIRECT);
assert_eq!(signout_resp.status(), StatusCode::FOUND);
}
#[actix_rt::test]