slowapi
slowapi copied to clipboard
feat: recursive search in subapps for handler
Middleware application rate limit was not applied on sub application handlers, I added a recursive search for handlers of sub apps so that they get caught in middleware ratelimit as well.
@laurentS what do you think please ?
Hi @devamin thanks for sending in this PR!
A couple of thoughts:
-
mypy
is complaining in CI, can you check what the problem is? - does it seem like supporting submounted routes for starlette as well would be a good idea?
- are all recursive calls guaranteed to terminate? This is called on each request, so we should take care not to make this call too expensive :)