diff --git a/rust/src/main.rs b/rust/src/main.rs index 2ee4725..cfdbf29 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -192,6 +192,7 @@ async fn main() -> Result<(), StartError> { }) }), ) + .route("/debug", get(debug)) .nest( (&TopLevelPage::Trips.path()).into(), Router::new() @@ -290,6 +291,17 @@ async fn root() -> impl IntoResponse { view::Root::build(&view::home::Home::build(), None) } +async fn debug(headers: HeaderMap) -> impl IntoResponse { + let out = { + let mut out = String::new(); + for (key, value) in headers.iter() { + out.push_str(&format!("{}: {}\n", key, value.to_str().unwrap())); + } + out + }; + out +} + #[derive(Deserialize, Default)] struct InventoryQuery { edit_item: Option,