Ocelot中的多个UpstreamPathTemplates

问题描述

如何在Ocelot中定义多个UpstreamPathTemplate?

    {
      "DownstreamPathTemplate": "prod/products/v1.0","DownstreamScheme": "https","DownstreamHostAndPorts": [
        {
          "Host": "mysite.com","Port": 225
        }
      ],"UpstreamPathTemplate": "/products/v1.0","UpstreamHttpMethod": [ "Get","Post" ]
    }

目前,单个UpstreamPathTemplate可以如上所示工作,但是我需要支持多个版本作为临时解决方法。我可以用字符串数组替换UpstreamPathTemplate的字符串吗?如下所示。

    {
      "DownstreamPathTemplate": "prod/products/v1.0","UpstreamPathTemplate": [ "/products/v1.0","/products/v1.1" ],"Post" ]
    }

或者我只需要创建一个全新的对象,重述下游信息和所有其他信息?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)