Reverse proxy directing instead of acting as a reverse proxy

Not applicable

I have added a simple API to my Apigee account but on making a request via Apigee, a 301 response is being returned and the Apigee URL is being rewritten to the target API URL.

Testing the target API directly returns a 200 response and testing on two other competitor platforms doesn't show this behaviour either which makes me think there is a setting somewhere that I need to change to have Apigee act as a reverse proxy instead of a redirect.

When setting up the API in Apigee I did specify Reverse Proxy.

Any ideas?

0 5 563
5 REPLIES 5

@Martin Clayton , Welcome to Apigee Community ,

Can you share Target Url if possible to try out same ? If target returns 301 & you test same in the browser then page will be redirected. I believe it's a browser setting rather than Apigee. Did you get a chance to test same using tool like curl / postman ?

You can share target URL using secure comments option below the comment box submit button if it's confidential.

I can't share the URL as it contains a confidential api key and our policies do not allow this!!

However, testing using curl -v from a different (Linux) machine showed a 200 response when the target API was contacted directly.

curl -v from the Linux machine shows a 301 response to Apigee.

What does tracing the request reveal? I would start by examining the request to and response from target to see why the 301 is getting in there.

The trace shows the 301 being generated by the request to the Apigee URL.

Where do we see that being generated? Refer to trace picture below. Is it in 'response from target'? If so, click on 'request sent to target' and click show curl and compare that to the curl you run directly. If not, it must be coming in the 'response' sent to client section. Do you have any policies that are being executed between response from target and response to client?

2479-trace.png

What you are seeing is not standard behavior. There should be no additional configuration required.