alibaba / virtual-environment

Route isolation with service sharing https://alibaba.github.io/virtual-environment/#/zh-cn/
MIT License
217 stars 39 forks source link

kt-virtual-environment/rule配置不支持corsPolicy.allowOrigins属性 #36

Open linfan opened 2 years ago

linfan commented 2 years ago

使用如下json:

{
  "Match": [
    {
      "Uri": {
        "Prefix": "/"
      }
    }
  ],
  "corsPolicy": {
    "allowOrigins": [
      {
        "exact": "*"
      }
    ],
    "allowCredentials": true,
    "allowHeaders": [
      "app-key",
      "yizhou-j-token"
    ],
    "allowMethods": [
      "GET",
      "POST",
      "PUT",
      "DELETE",
      "PATCH",
      "OPTIONS"
    ]
  }
}

最后生成的配置

image

此段json未生效 "corsPolicy":{"allowOrigins":[{"exact":"*"}],缺失以下配置:

allowOrigins:
    - exact: '*'
linfan commented 2 years ago

待升级istio sdk版本至v1beta1