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
With the code below, the bp middleware runs before the app/global middleware. Can you explain why?
I expected the middleware to be registered on app level and the bp middleware on bp level
such that the app middleware is always executed first and the bp middleware as soon as the bp is "entered" on a request.
I know that this is theoretically solved by adding priority, but this behavior is not mentioned in the docs and feels like a bug because it contradicts intuition of data flow and locality.
Is there an existing issue for this?
Describe the bug
With the code below, the bp middleware runs before the app/global middleware. Can you explain why?
I expected the middleware to be registered on app level and the bp middleware on bp level
such that the app middleware is always executed first and the bp middleware as soon as the bp is "entered" on a request.
I know that this is theoretically solved by adding priority, but this behavior is not mentioned in the docs and feels like a bug because it contradicts intuition of data flow and locality.
Related Issue: #2636
Code snippet
Expected Behavior
Expected the app middleware to wrap the bp middleware
How do you run Sanic?
As a script (
app.run
orSanic.serve
)Operating System
Ubuntu
Sanic Version
22.9.1
Additional context
No response
The text was updated successfully, but these errors were encountered: