fastify / fastify-rate-limit

A low overhead rate limiter for your routes
MIT License
504 stars 71 forks source link

Redis should work with ban #336

Closed gurgunday closed 1 year ago

gurgunday commented 1 year 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 1 year ago

How is the performance?

gurgunday commented 1 year ago

Will check it

gurgunday commented 1 year 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