Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How do I chain all requests from proxy A to proxy B in Edge?

Not applicable

I have two proxies: A and B.

Proxy B is the "main" one, connected directly to my backend server using an HTTP Target Endpoint. However, for a given set of consumers, I would like to apply some transformations in my server's responses.

The solution that I came up with is to use the Chaining API Proxy feature of Apigee Edge. In my case, I can create a new proxy - A - that will simply forward all requests to proxy B, so that I can add a policy in its postflow steps to do the needed transformation. So far, so good.

However, by simply following the documentation, I couldn't get this to work. Here are the basepaths of both proxy B (main one) and A (wrapper one):

Proxy B: /v1/foo/bar
Proxy A: /prefix/v1/foo/bar

I want all requests to be forwarded from proxy A to proxy B:

/prefix/v1/foo/bar/* → /v1/foo/bar/*

My target endpoint in proxy A looks like this:

<LocalTargetConnection>
    <Path>/v1/foo/bar</Path>
</LocalTargetConnection>

And every request that I make to proxy A will return me an empty response. How can I debug this?

Solved Solved
0 5 1,241
1 ACCEPTED SOLUTION

Not applicable

The problem was in my route. I have created my Proxy Endpoint with no target, but then its route was pointing to nowhere. As soon as I added the correct route to my default Proxy Endpoint, everything started working. Here is an example of what solved it for me:

<RouteRule name="default">
  <TargetEndpoint>Proxy-B</TargetEndpoint>
</RouteRule>

View solution in original post

5 REPLIES 5