Trying to set up a Kong Proof of Concept for work to be used as our api gateway layer. One weird thing is happening that I can't figure out and I'm not sure if there is a cache layer built into Kong or not. General setup is :
Kong running on a Debian Google Cloud Engine instance in Docker (both kong-database and kong). Upstream is an ha-proxy instance fronting a kubernetes cluster with an ingress controller handling "internal to the network" requests. Plan would be to run Kong inside of Kubernetes later.
API Configuration looks like :
{data: [{created_at: 1474672178000,
request_path: "/hello",
id: "35451604-87a8-4abb-b7b8-ca1c82898f01",
name: "helloworld",
preserve_host: false,
strip_request_path: true,
}
], total: 1
}
the internal hello-world world will return with a simple "hello" at the base URL "/" and if a request is made to "/echo/foo" will return foo (or whatever is after /echo).
Here is the weird part. From within the Kong container curl requests to the hello-world.internal works fine. A request to / returns hello and a request to /echo/foo returns foo.
The part that fails is ..
Both requests to the domain on different paths returns the same thing.
If I curl from an external host to the IP address that
kong-poc.domain.io resolves to it works as expected with /hello returning hello and /echo/foo returning foo. Same thing from a browser. Using the IP address everything works as expected.
Is there anything magical about using the hostname that within openresty it's caching a response or doing something odd to not properly pass the full path through to the upstream?
Thanks.
-steve