diff --git a/examples/reverse-proxy/src/main.rs b/examples/reverse-proxy/src/main.rs index 3284f590..ab551e5b 100644 --- a/examples/reverse-proxy/src/main.rs +++ b/examples/reverse-proxy/src/main.rs @@ -36,7 +36,12 @@ async fn main() { .unwrap(); } -async fn handler(Extension(client): Extension, mut req: Request) -> Response { +async fn handler( + Extension(client): Extension, + // NOTE: Make sure to put the request extractor last because once the request + // is extracted, extensions can't be extracted anymore. + mut req: Request, +) -> Response { let path = req.uri().path(); let path_query = req .uri()