async fn handle_logout()-> impl IntoResponse{ let tera = tera::Tera::new("templates/*").unwrap(); let mut context = tera::Context::new(); context.insert("title", "Index page"); context.insert("data", "hoge"); let output = tera.render("index.html", &context); let cookie:String = format!("session_token=_"); let headers = AppendHeaders(vec![("Set-Cookie", cookie)]); (headers, axum::response::Html(output.unwrap())) }
特にコメントなし。
さー次行こう^^