Closed ydylla closed 2 years ago
Hi @pkieltyka, can you please take a look at this? It's only a small change, but I think this would be a useful feature.
@pkieltyka, how can I move this forward and get it merged?
What about using middleware.Maybe in chi?
I did not know that exists, now I feel stupid 😅
You are right this would work and is more general. I will close this, thanks.
P.S. Just searched it on https://go-chi.io but it's not listed there, which explains why I missed it.
Hi, this pull request adds the possibility to dynamically disable the rate limiting. For example to allow requests from specific ip ranges without rate limiting them.
It is implemented via a special error
httprate.NoRateLimit
which custom key functions can return to signal that the rate limit handler should be skipped.You can find an example in the README.md
I hope you like it 😃