.NET使用YARP根据域名转发实现反向代理

  "ReverseProxy": {

  "Routes": {

  "baidu": {

  "ClusterId": "baidu",

  "Match": {

  "Hosts": [ "test1.ysmc.net.cn" ],

  "Path": "{**catch-all}"

  }

  },

  "blazor": {

  "ClusterId": "blazor",

  "Match": {

  "Hosts": [ "test2.ysmc.net.cn" ],

  "Path": "{**catch-all}"

  }

  }

  },

  "Clusters": {

  "baidu": {

  "LoadBalancingPolicy": "RoundRobin",

  "Destinations": {

  "baidu": {

  "Address": "https://www.baidu.com/"

  }

  }

  },

  "blazor": {

  "LoadBalancingPolicy": "RoundRobin",

  "Destinations": {

  "blazor": {

  "Address": "https://www.blazor.zone/"

  }

  }

  }

  }

  }