ulule / limiter

Dead simple rate limit middleware for Go.
MIT License
2.08k stars 150 forks source link

Custom keys? #205

Open RasmusN opened 2 years ago

RasmusN commented 2 years ago

Is it possible to have other keys than IP-addresses? I want to make rate limit middle-wares for both IP and other properties.

Something like this library has where you provide a key-function to the Limiter https://github.com/JGLTechnologies/gin-rate-limit

dnozdrin commented 1 year ago

@RasmusN is this the subject of your request? https://github.com/ulule/limiter#none-of-the-above https://github.com/ulule/limiter/blob/master/drivers/middleware/stdlib/options.go#L54