Closed aniketcodes closed 2 months ago
CI is failing
Yeah... There is some issue with the coverage... I will update the test cases by today.
Updated the testcases
It is fixed. @gurgunday
Hi @gurgunday / @mcollina Can you please help me with these? Am I missing something with the test?
@gurgunday can you please run the CI again?
I’ll take a look if it’s passing on your end
Hi @gurgunday Can you please run the CI again?
There was some issue with node_modules and c8. I have fixed them.
Added it so that it is easily configurable across different route files.
@gurgunday Will this implementation enhance the feature of grouping the routes without encapsulation?
I'm not sure, I feel like we're duplicating functionality and all these small additions might add up to slow down the rate limiter performance
@climba03003 @Uzlopak what do you think? Keep in mind https://github.com/fastify/fastify-rate-limit/pull/380#pullrequestreview-2281036104 already exists
I'm not sure, I feel like we're duplicating functionality and all these small additions might add up to slow down the rate limiter performance
We have a kind-of-common use case for it: we have several similar endpoints. Some of them should be used from frontend, some from backend and so on. If we use per-route rate limit some clever users start to use all similar endpoints to achieve their task and 50 rps becomes 300 rps
This PR adds the capability to group various routes and have a common rate limit for them.
369
Checklist
npm run test
andnpm run benchmark