Closed
Description
openedon Oct 19, 2023
Describe the bug
Following the README for rate limiting I am able to successfully add a rate limiter policy customPolicy
, however, when I try to disable it for a route I am getting the error RateLimiter policy 'disable' not found for route 'route1'.
I think this might be caused by the code for validating routes being unable to detect these built in policies, since the collection appears empty.
Am I doing something incorrectly here?
To Reproduce
Using config example from rate-limiting.md
"ReverseProxy": {
"Routes": {
"route1" : {
"ClusterId": "cluster1",
"Match": {
"Hosts": ["example.pageuppeople.com"]
},
"RateLimiterPolicy": "disable"
}
},
"Clusters": {
"cluster1": {
"Destinations": {
"destination1": {
"Address": "http://example.com/"
}
}
}
or with in-application config:
new RouteConfig
{
RouteId = routeId,
ClusterId = clusterId,
Match = new RouteMatch
{
Hosts = commaSeparatedHosts.Split(","),
},
RateLimiterPolicy = "Disable"
};
See my draft PR here, I am happy to provide a minimal example if that is required
Further technical details
- YARP 2.0.1
- Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment