Skip to content

refactor: abstract ratelimiter package

Vladimir Shushlin requested to merge domain-rate-limiter into master

What does this MR do?

We want to add domain-based ratelimiter. The logic will be identical, but we'll use host instead of IP address.

This MR just removes all the mentions of IP from the rate-limiter package and prepares for the implementation of domain-based rate-limits.

Initial idea was to make ratelimiter package to take config for both IP and domain rate-limiters and give a single middleware in return. I think it will be easier to just make it configurable, and return 2 separate middlewares.

#630 (closed)

TODO

Edited by Vladimir Shushlin

Merge request reports