Closed Panos80 closed 8 months ago
This is important error of logic! It cannot be ignored or switched off.
But if you don't want to see it in the log, you can define a fake route to nowhere.
{
"Routes": [
{
"DownstreamPathTemplate": "/api/{everything}",
"DownstreamScheme": "http",
"RateLimitOptions": {
"ClientWhitelist": [],
"ClientIdHeader": "LoginId",
"EnableRateLimiting": true,
"Period": "1s",
"PeriodTimespan": 1,
"Limit": 50
},
"ServiceName": "clientserviceapi",
"UpstreamPathTemplate": "/api/client-service/{everything}",
"UpstreamHttpMethod": ["Options", "Get", "Post", "Put", "Delete"]
},
// fake route
{
"DownstreamPathTemplate": "/",
"UpstreamPathTemplate": "/",
"UpstreamHttpMethod": ["Options", "Get", "Post", "Put", "Delete"]
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "www.google.com",
"Port": 443
}
]
}
]
}
Expected Behavior
We are using ocelot to create an API gateway for microservices / APIs which are deployed in Azure Kubernetes. We use a global configuration:
Actual Behavior
Everything works find but we are seeing continuously the following error:
previousRequestId: no previous request id, message: Error Code: UnableToFindDownstreamRouteError Message: Failed to match ReRoute configuration for upstream path: /, verb: GET. errors found in ResponderMiddleware. Setting error response for request path:/, request method: GET
It seems like the ocelot is trying to find a configuration for some root path (/) which is though not required. Can we add a configuration to ignore this error? Many thanks
Specifications