Nekrocuck

This commit is contained in:
sneedmaster
2025-09-28 12:59:09 +02:00
commit a2d093954d
402 changed files with 13763 additions and 0 deletions

13
src/web/logout.rs Normal file
View File

@@ -0,0 +1,13 @@
use actix_web::{cookie::Cookie, get, http::StatusCode, HttpResponse, HttpResponseBuilder};
#[get("/logout")]
pub async fn logout() -> HttpResponse {
let mut auth = Cookie::named("auth");
auth.make_removal();
HttpResponseBuilder::new(StatusCode::SEE_OTHER)
.append_header(("Location", "/"))
.cookie(auth)
.finish()
}