fastify / fastify-rate-limit

A low overhead rate limiter for your routes
MIT License
477 stars 66 forks source link

Redis should work with ban #336

Closed gurgunday closed 10 months ago

gurgunday commented 10 months ago

Closes #335

~Now a custom store user should handle when ban happens themselves - I believe this will actually lead to more flexible configurations and simpler code because that's how max currently works as well~

~If someone objects to my last point, I can make it non-breaking by adding a simple check and falling back to old behavior if res.ban is undefined, which means CustomStore didn't do anything with the newly added ban parameter~

Uzlopak commented 10 months ago

How is the performance?

gurgunday commented 10 months ago

Will check it

gurgunday commented 10 months ago

@Uzlopak I reset my Mac and can't set up Redis right now... I don't think it's that bad and besides we can't have a feature not working correctly

The change is no longer breaking