I have an issue with APIGEE as follows. When I call the API directly to the partner's URL, it works fine. However, when I call it through APIGEE, I get a 503 Service Unavailable error along with an HTML snippet indicating that the partner's system is under maintenance (this suggests that the API call has reached the partner’s system but is being blocked by them). I have confirmed with the partner that the issue is caused by an incorrect Host header, which results in the 503 error. I have tried everything to set the Host header correctly via policy, but it seems that the header does not change, as I am still receiving the same 503 error.
After some time of research and trial and error, I was able to find a solution to the issue I was facing.
Solution: After further research, I found that Apigee was not able to modify the Host header properly when forwarding the request. The correct solution was to set the Host header at the F5 load balancer level instead of trying to manage it within Apigee.
Here’s why: Even though you can configure policies in Apigee to modify headers, Apigee seems to have limitations when it comes to changing the Host header for backend communication. As a result, the request would still be sent with the wrong Host value, causing the partner system to reject it.