docs: Clarify route_layer does not apply middleware to the fallback handler (#3567)

This commit is contained in:
Mohamed Macow
2025-12-20 14:03:26 +01:00
committed by Jonas Platte
parent 4404f27cea
commit 78656ebb4a
+1 -2
View File
@@ -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.