您将如何根据两组相似的路由设置重新路由到不同的机器。请指教。
问题/问题:冲突的情况在/customers/1
&之间/customers/1/products
在每个人要去不同的机器之间。
- 机器名称:customer
GET /customers
GET /customers/1
POST /customers
PUT /customers1
DELETE /customers/1
- 机器名称:customerproduct
GET /customers/1/products
PUT /customers/1/products
豹猫.json
{
"ReRoutes": [
{
"DownstreamPathTemplate": "/customers/{id}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "customer",
"Port": 80
}
],
"UpstreamPathTemplate": "/customers/{id}",
"UpstreamHttpMethod": [ "Get", "Post", "Put", "Delete" ]
},
{
"DownstreamPathTemplate": "/customers/{id}/products",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "customerproduct",
"Port": 80
}
],
"UpstreamPathTemplate": "/customers/{id}/products",
"UpstreamHttpMethod": [ "Get", "Put" ]
}
],
"GlobalConfiguration": {
"BaseUrl": "http://localhost:80"
}
}