TargetEndpoint Routing Rule based on Query Parameter

Hello,

I am trying to Route an inbound request to a Target Endpoint based on a request Parameter "region" using the following code.

 

  <RouteRule name="Target-NA">
    <Condition>request.queryparam.region="na"</Condition>
    <TargetEndpoint>Target-NA</TargetEndpoint>
  </RouteRule>
  <RouteRule name="Target-EU">
    <Condition>request.queryparam.region="eu"</Condition>
    <TargetEndpoint>Target-EU</TargetEndpoint>
  </RouteRule>

 

  But doesnt seem to work at all for 

 

https://{host}/{proxy-endpoint}?region=eu

 

 Am i doing something wrong?

Solved Solved
1 2 180
1 ACCEPTED SOLUTION

The original one was fine. I had a policy that was deleting the query param based on which i was doing the routing 😑

View solution in original post

2 REPLIES 2

i have tried every option possible to no avail. Any help would be deeply appreciated.

request.queryparam.region=="na"

request.queryparam['region']="eu"

request.queryparam['region']=="eu"

The original one was fine. I had a policy that was deleting the query param based on which i was doing the routing 😑