aws / chalice

Python Serverless Microframework for AWS
Apache License 2.0
10.67k stars 1.01k forks source link

Why middleware applied at blueprint level applies to whole application ? #2090

Open therougeb opened 9 months ago

therougeb commented 9 months ago

Hello,

When I'm declaring a middleware with: my_blueprint.register_middleware(func_middleware), I've found that the middleware applies to the application, not only the blueprint.

So i've searched on the github repo and see that actually when we use blueprint.register_middleware it seems to cal the same method on app level,

I found this strange as if we use blueprint, technically we also need to defined resources / middlewares only at blueprints level.

Should such a feature (to have blueprint scoped middlewares) may be introduced to chalice ?