haproxy not able to forward the request to the api proxy

Not applicable

I am building a poc in which I redirect the api calls from my haproxy to apigee, handle api throttling and redirect to the api layer.

my api proxy is http://csp-trial-test.apigee.net/example. In my HaProxy I am forwarding it to this api proxy as follows

frontend incoming

bind *:80
acl is_api path_beg /api

backend api

server apigee csp-trial-test.apigee.net:80

But I am getting 404 error. I also tried the public IP of this host and got the same error. Am I requesting the correct host? What's the suggested way to achieve this?

When I tried forwarding the request to mocktarget.apigee.net:80 it is working fine. But I am getting 404 only when I use csp-trial-test.apigee.net:80

0 3 1,781
3 REPLIES 3

Not applicable

First of all, make sure you can successfully ping and telnet csp-trial-test.apigee.net:80. You can also check <Property name="use.proxy">true</Property> to make sure that all request will pass through the configured proxy.

I reset the header in haproxy and it worked.

previously,

host: csp.mydomain.com

server: csp-trial-test.apigee.net

I got 404 error from apigee server. But when I tried mocktarget.apigee.net it worked.

Now after changing the host in haproxy (http-request set-header csp-trial-test.apigee.net:80),

host: csp-trial-test-apigee.net

server: csp-trial-test.apigee.net

it worked fine.

Is apigee restricting calls based on host?

Not applicable

Well, I don't think so that apigee is restricting calls based on a host. Until and unless you have defined some quota policy.