7.2.1
Per-route config resolves on parameterised and included routes (v7.2.1)
- Fixed — Per-route decorator config now resolves on routes with path parameters and routes added via
include_router.SecurityMiddlewareis aBaseHTTPMiddleware, so it runs before the router andscope["route"]is unset; it resolved the active route by exact-path string comparison (r.path == request.url.path), which never matches a templated path like/items/{id}. As a result every per-route decorator (rate_limit,max_request_size,content_type_filter,custom_validation,detection_exclusion,suspicious_detection, behavioral rules, …) silently did nothing on parameterised or router-included routes. Route resolution now replicates Starlette's ownroute.matches(scope)matching, so per-route config fires on those routes too. Static, non-parameterised routes are unaffected.
What's Changed
Full Changelog: 7.2.0...7.2.1