You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correct me if I'm wrong, but the middleware stack is only executed when a route is matched. Is there a reason for this?
Given that the middleware stack runs before a matched route's callable, it would seem to make more sense that the stack is executed regardless of whether a route is matched. Perhaps I'm missing something.
My use case is a middleware that will always check for HTTP auth - regardless of whether a route is matched or not.
Thanks
The text was updated successfully, but these errors were encountered:
I have another use case for this: Rewriting the path of requests before they are matched, to support deprecated / legacy paths without having to register the route twice.
Correct me if I'm wrong, but the middleware stack is only executed when a route is matched. Is there a reason for this?
Given that the middleware stack runs before a matched route's callable, it would seem to make more sense that the stack is executed regardless of whether a route is matched. Perhaps I'm missing something.
My use case is a middleware that will always check for HTTP auth - regardless of whether a route is matched or not.
Thanks
The text was updated successfully, but these errors were encountered: