diff --git a/axum/src/docs/method_routing/route_layer.md b/axum/src/docs/method_routing/route_layer.md index 501b5517..b045d100 100644 --- a/axum/src/docs/method_routing/route_layer.md +++ b/axum/src/docs/method_routing/route_layer.md @@ -1,8 +1,7 @@ Apply a [`tower::Layer`] to the router that will only run if the request matches a route. -Note that the middleware is only applied to existing routes. So you have to -first add your routes (and / or fallback) and then call `route_layer` +Note that the middleware is only applied to existing routes. First add your routes and then call `route_layer` afterwards. Additional routes added after `route_layer` is called will not have the middleware added.