Skip to content

Commit 1d9db39

Browse files
committed
Update documentation for route_layer middleware usage
Clarify the order of adding routes and applying route_layer middleware.
1 parent 26367b9 commit 1d9db39

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

axum/src/docs/method_routing/route_layer.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
Apply a [`tower::Layer`] to the router that will only run if the request matches
22
a route.
33

4-
Note that the middleware is only applied to existing routes. So you have to
5-
first add your routes (and / or fallback) and then call `route_layer`
4+
Note that the middleware is only applied to existing routes. First add your routes and then call `route_layer`
65
afterwards. Additional routes added after `route_layer` is called will not have
76
the middleware added.
87

0 commit comments

Comments
 (0)