Rate limit entire application by a single policy
sharunthomas opened this issue · comments
Describe the question
- I want to enable rate limit for the entire application, so I created zuul properties like below.
But not working. Please comment a solution.
Now I kind of need to add multiple policies to rate limit my entire application! - What is
zuul.ratelimit.behind-proxy=true
means ?
Additional context
zuul.ratelimit.behind-proxy=true
zuul.routes.defaultRoute.path=/api/**
zuul.routes.defaultRoute.url=forward:/
zuul.ratelimit.policy-list.defaultRoute[0].limit=2
zuul.ratelimit.policy-list.defaultRoute[0].refresh-interval=60
zuul.ratelimit.policy-list.defaultRoute[0].type[0]=user
Why url_pattern
gives error
Property: zuul.ratelimit.defaultPolicyList[0].type[1]
Value: url_pattern=/api/*
Reason: Failed to convert property value of type 'java.lang.String' to required type 'com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.config.properties.RateLimitProperties$Policy$MatchType' for property 'defaultPolicyList[0].type[1]'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [@javax.validation.Valid @javax.validation.constraints.NotNull com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.config.properties.RateLimitProperties$Policy$MatchType]
I'm using 1.7X spring cloud rate limiter