mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Add #[debug_middleware] (#2725)
Co-authored-by: David Pedersen <[email protected]>
This commit is contained in:
co-authored by
David Pedersen
parent
c57c2847b2
commit
df612fdc72
@@ -0,0 +1,9 @@
|
||||
use axum::{debug_middleware, extract::Request, middleware::Next, response::Response};
|
||||
|
||||
#[debug_middleware]
|
||||
async fn my_middleware(request: Request, next: Next, next2: Next) -> Response {
|
||||
let _ = next2;
|
||||
next.run(request).await
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Reference in New Issue
Block a user