This commit is contained in:
Felipe Andrade 2023-05-15 12:28:41 -07:00
parent 2f0f949784
commit 3704119064
4 changed files with 7 additions and 17 deletions

@ -43,14 +43,13 @@ type MetricsConfig struct {
} }
type RateLimitConfig struct { type RateLimitConfig struct {
UseRedis bool `toml:"use_redis"` UseRedis bool `toml:"use_redis"`
EnableBackendRateLimiter bool `toml:"enable_backend_rate_limiter"` BaseRate int `toml:"base_rate"`
BaseRate int `toml:"base_rate"` BaseInterval TOMLDuration `toml:"base_interval"`
BaseInterval TOMLDuration `toml:"base_interval"` ExemptOrigins []string `toml:"exempt_origins"`
ExemptOrigins []string `toml:"exempt_origins"` ExemptUserAgents []string `toml:"exempt_user_agents"`
ExemptUserAgents []string `toml:"exempt_user_agents"` ErrorMessage string `toml:"error_message"`
ErrorMessage string `toml:"error_message"` MethodOverrides map[string]*RateLimitMethodOverride `toml:"method_overrides"`
MethodOverrides map[string]*RateLimitMethodOverride `toml:"method_overrides"`
} }
type RateLimitMethodOverride struct { type RateLimitMethodOverride struct {

@ -16,6 +16,3 @@ backends = ["good"]
[rpc_method_mappings] [rpc_method_mappings]
eth_chainId = "main" eth_chainId = "main"
[rate_limit]
enable_backend_rate_limiter = true

@ -20,6 +20,3 @@ backends = ["bad", "good"]
[rpc_method_mappings] [rpc_method_mappings]
eth_chainId = "main" eth_chainId = "main"
[rate_limit]
enable_backend_rate_limiter = true

@ -26,6 +26,3 @@ backends = ["good"]
[rpc_method_mappings] [rpc_method_mappings]
eth_chainId = "main" eth_chainId = "main"
[rate_limit]
enable_backend_rate_limiter = true