-
I have the following simple code:
In a real world example, my For routing, basically:
1 and 2 work well. 3 does not. For example,
I think this is because the Extension middleware isn't accessible to fallbacks? How to make it work? Or some workaround (other than having to specify every single fallback route manually)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Your using Also, your |
Beta Was this translation helpful? Give feedback.
Your using
route_layer
, which registers a middleware that only runs when an explicit route is matched. Uselayer
if you want the middleware to also apply to the fallback.Also, your
with_state
call on the fallbackMethodRouter
seems like a no-op, without it the laterwith_state
call would apply to it and do the same thing.