AnsweredAssumed Answered

Context variable to find out the full URL for which the request has come

Question asked by Karthik.pn on Sep 2, 2015
Latest reply on Sep 3, 2015 by Karthik.pn

Hi,

 

We have a network load balancer and Virtual IP under which the gateway servers are mapped. Now we need to implement one more Virtual IP for the same gateway servers on the load balancers such that, for a same service, one set of users might call the gateway using a VIP and the others might call using a different VIP. Now, we need to route the request to the end-point based on the VIP through which the request was made to the gateway.

 

For Example: We create a VIP for internal users and ask them to call the gateway through that VIP URL --> https://abc-internal.xyz.com/<Service resolution path>

                       We create a VIP for external users and ask them to call the gateway through that VIP URL --> https://abc-external.xyz.com/<service resolution path>

 

Both the VIPs, "abc-internal.xyz.com" and "abc-external.xyz.com" will route the request to the same gateway. Now in the back-end I have 2 different endpoints. "Endpoint-internal users" & "Endpoint - External users".

 

Now I need to create a routing assertion as follows, which I can implement through compare variable assertion

}

IF request has come through URL "abc-internal.xyz.com"

  route to "Endpoint-Internal"

Else

route to "Endpoint-External"

}

 

My problem here is, I am not able to find the context variable through which I can get the values of the VIP URL for which the request was made. The context variables ${request.url.path} and ${request.http.uri} returns only the URL with the resolution path within the gateway. How do I retreive the complete URL for which the request was made (including the VIP URL)? Is there any specific context variable which will give this info?  Or is there anyother way of implementing the above mentioned scenario?

 

Please Help!

 

Thanks,

Karthik

Outcomes