I am trying to create a pass-through API proxy using Kong community edition. I have used below commands to create/add the service, route and basic auth plugin
curl -i -X POST http://localhost:8001/services/
curl -i -X POST http://localhost:8001/routes/
- Basic Auth plugin -
curl -X POST http://localhost:8001/routes/4f181b2a-ea70-4d7f-8c67-669f60c20bbf/plugins
- Consumer -
curl -i -X POST
- Create credentials -
curl -X POST http://localhost:8001/consumers/abcorgapp/basic-auth
- Call API -
curl -i -X GET
–header “Host: xxxxxxxxxxx.com”
–header ‘Authorization: Basic YWJjb3JndXNlcjpkZW1vMjAxOQo=’
The kong is running on docker container and the backend service that I want to hit is also on another container. I am able to hit that service using curl command from the machine where docker engine is running.
I am getting below error when I hit the API.
Date: Mon, 11 Feb 2019 05:27:02 GMT
This must be coming from Kong to backend connectivity because - If I call the API with incorrect path then it gives the route not matched error, If I give wrong credentials then it gives a 403 forbidden error. So connection between postman to Kong is working fine but there is something missing to configure.
Can anyone help me and let me know how to debug this issue of if I have to do more configuration to make this work?