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
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
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?
Well, I don't think so that apigee is restricting calls based on a host. Until and unless you have defined some quota policy.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |