fastify / fastify-rate-limit

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

add the "key" in the "onExceeding" and "onBanReach" #258

Closed SergioGlorias closed 2 years ago

SergioGlorias commented 2 years ago

Checklist

Uzlopak commented 2 years ago

why the key? why not the actual IP?

SergioGlorias commented 2 years ago

why the key? why not the actual IP?

i'm working on some things that can't directly be the IP the default key and there are people who use keys different from the default IP

onBanReach already provides the key is a big help only these two functions do not have the key

SergioGlorias commented 2 years ago

@mcollina I don't have much practice with this but could you check?