0

Do we have any setting option in MS Yarp to send http put/post requests to one cluster and http get to different cluster?

Or any way to apply different header transformation for http put/post and get request?

In this example I am trying to forward the post to createuserapicluster and get to different cluster getuserapicluster

"ReverseProxy": {
    "Routes": [
      {
        "RouteId": "user1",
        "ClusterId": "createuserapicluster",
        "Match": {
          "Path": "/api/users/{**catch-all}"
        },
        "Transforms": [
          {
            "PathRemovePrefix": "/api/users"
          }
        ]
      },
      {
        "RouteId": "user2",
        "ClusterId": "getuserapicluster",
        "Match": {
          "Path": "/api/users/{**catch-all}"
        },
        "Transforms": [
          {
            "PathRemovePrefix": "/api/users"
          }
        ]
      }
    ],
    "Clusters": {
      "createuserapicluster": {
        "Destinations": {
          "destination1": {
            "Address": "https://localhost:8080"
          }
        }
      },
      "getuserapicluster": {
        "Destinations": {
          "Destination1": {
            "Address": "https://localhost:9090/"
          }
        }
      }
    }
  }
Sandeep Kumar
  • 783
  • 1
  • 5
  • 13

0 Answers0