OptinalTargetURL does not add route rule in new version of proxy editor.

Not applicable

Hello All,

I was trying Optional Target URL in adding resources/flows to proxy.But it was bit strange. Following are the points I noticed:

1) When I give endpoint in optional target URL in new version of proxy it does not add any route rules in proxy.

1654-optionaltarget5.png

1655-optionaltarget6.png

2) When I give endpoint in optional target URL in classic version of proxy it adds route rules in proxy but the same is not visible when accessing new version of proxy editor.

1656-optionaltarget7.png

However when I download the proxy it is there in the /proxies/default.xml.

Can somebody help me in the same? Help me understanding the use of Optional target URL in conditional flows.I have attached few screen-shots.

1 3 394
3 REPLIES 3

@Vipul Agarwal , Thank you for highlighting same & great finding. For me, It clearly looks like bug in the new version of proxy editor. For time being, please use XML to specify route rules instead of using UI. We will let our engineering team know about this.

Still no progress in this issue?

Any progress yet?

It's interesting and marvelous that stackoverflow provides the answer and the required snippet as a workaround:

 

https://stackoverflow.com/questions/22783986/one-api-proxy-calling-two-different-target-endpoints

<ProxyEndpoint name="default">
    <RouteRule name="Resource-1">
        <Condition>(proxy.pathsuffix MatchesPath &quot;/someResource&quot;) and (request.verb = &quot;GET&quot;)</Condition>
        <HTTPTargetConnection>
            <URL>http://myAlternateEndpoint</URL>
        </HTTPTargetConnection>
    </RouteRule>
    ....