Оказалось, что я объявил тот же шаблон, что и конечная точка:
{
"version": 2,
"timeout": "3000ms",
"cache_ttl": "300s",
"name": "myapi",
"output_encoding": "json",
"port": 4321,
"endpoints": [
{
"endpoint": "/api/v1/me/profile",
"method": "GET",
"headers_to_pass": [ "*" ],
"output_encoding": "no-op",
"concurrent_calls": 1,
"backend": [
{
"url_pattern": "/api/me/profile",
"encoding": "no-op",
"host": [
"http://123.45.67.89:4321"
]
}
]
},
{
"endpoint": "/api/v1/{uid}/profile",
"method": "GET",
"headers_to_pass": [ "*" ],
"querystring_params": [ "*" ],
"output_encoding": "no-op",
"concurrent_calls": 1,
"backend": [
{
"url_pattern": "/api/{uid}/profile",
"encoding": "no-op",
"host": [
"http://123.45.67.89:4321"
]
}
]
}
]
}
После изменения в это работает хорошо:
{
"version": 2,
"timeout": "3000ms",
"cache_ttl": "300s",
"name": "myapi",
"output_encoding": "json",
"port": 4321,
"endpoints": [
{
"endpoint": "/api/v1/me/profile",
"method": "GET",
"headers_to_pass": [ "*" ],
"output_encoding": "no-op",
"concurrent_calls": 1,
"backend": [
{
"url_pattern": "/api/me/profile",
"encoding": "no-op",
"host": [
"http://123.45.67.89:4321"
]
}
]
},
{
"endpoint": "/api/v1/user/{uid}/profile",
"method": "GET",
"headers_to_pass": [ "*" ],
"querystring_params": [ "*" ],
"output_encoding": "no-op",
"concurrent_calls": 1,
"backend": [
{
"url_pattern": "/api/user/{uid}/profile",
"encoding": "no-op",
"host": [
"http://123.45.67.89:4321"
]
}
]
}
]
}
С уважением.