How to stop redirect

How can i stop redirect in apigee?

My backend service is redirecting to another url. I have added an assign message policy to change the response code to 200 and browser is getting 200 but it still makes another same call. How can i prevent the second call. Also how i set a cookie in the response of first call?

Thanks,

Krish

0 1 659
1 REPLY 1

My backend service is redirecting to another url.

You didn't provide all the details, so I am going to make some guesses. Tell me if I am correct.

  1. You are using Apigee Edge, you have an API proxy configured to connect to a target.
  2. Under some conditions that Target is replying with a 301/302 status code and a Location header.
  3. You do not wish to return a 301/302 to the original calling client
  4. You are using an AssignMessage policy attahed in a Response flow to over-write the status code that is then sent to the original client.

Is all of this correct?

Is it possible that your proxy is sending back a Location header to the original calling client? Can you also make sure that you are removing the Location header?

If all of the above is not correct, please elaborate, and provide clear details on your situation.