Skip to content

Extension middleware not added to fallbacks? #3184

Answered by jplatte
Pranoy1c asked this question in Q&A
Discussion options

You must be logged in to vote

Your using route_layer, which registers a middleware that only runs when an explicit route is matched. Use layer if you want the middleware to also apply to the fallback.

Also, your with_state call on the fallback MethodRouter seems like a no-op, without it the later with_state call would apply to it and do the same thing.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jplatte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3183 on January 20, 2025 08:24.