spring-cloud-zuul-ratelimit: Unable to match serviceId and routeId
rateLimit version 2.4.1 Here is my yml configuration.
ratelimit:
key-prefix: ${spring.cloud.client.ip-address}:apiserv_rate_limit
enabled: true
repository: REDIS
behind-proxy: true
default-policy-list: #optional - will apply unless specific policy exists
- limit: 10
quota: 1000
refresh-interval: 2000
type:
- url
policy-list:
cloud-currencyBackend:
- limit: 10
quota: 1000
refresh-interval: 60
type: #optional
- url=/backend/currency/**
routes:
cloud-currencyBackend:
path: /backend/currency/**
serviceId: currency-service
stripPrefix: false
Every time while RateLimitProperties.getPolicies(key) execute , the key will be routeId likes /backend/currency/**.
My policyList is serviceId : targetPolicy likes cloud-currencyBackend: some policy. Therefore the result of this method will always be defaultPolicyList.
How can I make this work ?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (5 by maintainers)
is
cloud-currencyBackendthe name of the service that is serving the/backend/currency/**endpoints?