mirror of
https://github.com/metosin/reitit.git
synced 2025-12-16 16:01:11 +00:00
doc: mention that coercion uses top-level-route-data-middleware
This commit is contained in:
parent
ecf22d5c4a
commit
99267d2943
1 changed files with 2 additions and 1 deletions
|
|
@ -243,4 +243,5 @@ using all of the above techniques:
|
||||||
|
|
||||||
- If you have a generic middleware, that doesn't depend on the route, use _top-level middleware_
|
- If you have a generic middleware, that doesn't depend on the route, use _top-level middleware_
|
||||||
- If you want to apply a middleware to only a couple of routes, use _nested middleware_ (ie. _route data_)
|
- If you want to apply a middleware to only a couple of routes, use _nested middleware_ (ie. _route data_)
|
||||||
- If you want a middleware to apply to all routes, but use route-specific data, consider _top-level route data_ combined with [Compiling Middleware](compiling_middleware.md)
|
- If you want a middleware to apply to all routes, but use route-specific data, you need _top-level route data_ combined with [Compiling Middleware](compiling_middleware.md)
|
||||||
|
- This is what many reitit features like [Ring Coercion](coercion.md) do. Check the examples & docs for the reitit features you want to use!
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue