unable to override TargetEndpoint property use.proxy dynamicaly

Not applicable

I have a proxy with policy and many systems are going to use , on the basis of target system we need to route to various target back end.

Using java script to use url dynamically but unable to pass use.proxy property in javascript. This is on premise Apigee.

0 5 593
5 REPLIES 5

@sunil K , Welcome to Apigee Community.

Above question is not very clear. Is this is a technical product question, please include

  1. What are you doing? - Please attach a proxy bundle / source code
  2. What are you seeing? - Please explain
  3. What are you expecting to see? - Please explain

Did you try route rules ?

test.

Thanks Anil.

I have a proxy in Edge which receive request from various system tartget in header and on the basis of that I have KVM which stores target url for each system and route the request to that system dynamically.

As of now there are two systems but in future it might go upto 100 so i dont want to change the proxy code but only insering new system value in KVM with their url.

It is on premise edge so we have forward proxy setting. For some target we need to forward the proxy and for some it is not. We are doing it as of now with

<Properties> <Property name="use.proxy">true</Property> </Properties>

<Properties> <Property name="use.proxy">false</Property> </Properties> But this also i want to do it in javascript where target url is set and set these from value stored in KVM which is true or false.

Not applicable

Hello @Anil Sagar,

I think, the question is would context.setVariable("use.proxy", myFlag) would work, where myFlag is T/F. I tried this approach, but not able to see the difference in the trace of Target Endpoint.

Any Idea ?

Not applicable

I have exactly the same issue. Have anyone managed to solve it?

The use.proxy property is statically configured. You will need two distinct TargetEndpoints - one with use.proxy = true, one with use.proxy = false.