Open switchplane-tom opened 2 years ago
Just catching up on issues, I'll remind myself on this next week and get back to you
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