Hi, we’ve stumbled upon an issue where the fallback endpoint would be processed before the required one.
We’re using kong 0.14.0 and config is something along these lines:
{
"created_at": 1537435169,
"hosts": null,
"id": "4a341687-a51b-543a-9d7a-a823dae25cf1",
"methods": [
"DELETE"
],
"paths": [
"/v1/auth/service/(\\S+)/policy/(\\S+)"
],
"preserve_host": false,
"protocols": [
"http",
"https"
],
"regex_priority": 0,
"service": {
"id": "c52978f2-123a-4bfd-b9e8-f0bae85c9a13"
},
"strip_path": false,
"updated_at": 1537435169
},
and fallback like this:
{
"created_at": 1537519573,
"hosts": null,
"id": "ec0674c6-7737-48e3-8c87-69bad8aecc55",
"methods": [
"GET",
"DELETE",
"POST",
"PUT",
"OPTIONS"
],
"paths": [
"/"
],
"preserve_host": false,
"protocols": [
"http",
"https"
],
"regex_priority": 0,
"service": {
"id": "f36d4b45-c2d1-4a09-917f-44003deb14f0"
},
"strip_path": false,
"updated_at": 1537519573
},
They are both using different upstream services. The issue is:
when calling API/v1/auth/service/(\S+)/policy/(\S+) we would get a response from the fallback with response-transformer message. After having removed methods from the fallback requests are going to a proper service. It was our understanding that fallback would be used as the last possible routing entry, especially when the expected URI is longer and should have matched before. Are methods evaluated before URI so the more methods the higher priority?