Why middleware applied at blueprint level applies to whole application ?
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
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 ?
Contributor guide
Research direction
Start by tracing how blueprint.register_middleware delegates to the application-level middleware method. Compare the intended blueprint scope with the current application-wide behavior. Done means a blueprint middleware affects only that blueprint's resources, with coverage for both blueprint and application routes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100