1 Commits
Author SHA1 Message Date
Dreaded_X e56d2d69cd --wip-- [skip ci] 2026-10-09 05:57:18 +02:00
+12
View File
@@ -101,6 +101,18 @@ async fn generate(opts: &GlobalOpts) -> Result<(), Error> {
#[debug_handler] #[debug_handler]
async fn handler(req: Request) -> impl IntoResponse { async fn handler(req: Request) -> impl IntoResponse {
println!("{req:?}");
let host = req
.headers()
.iter()
.find(|(name, _)| header::HOST.eq(name))
.map(|(_, value)| value)
.unwrap()
.to_str()
.unwrap();
println!("{host}");
let Some(path) = req.uri().path().strip_prefix("/") else { let Some(path) = req.uri().path().strip_prefix("/") else {
return StatusCode::BAD_REQUEST.into_response(); return StatusCode::BAD_REQUEST.into_response();
}; };