(wherever you see “ttp://” it means “http://”, I had to replace it since new users can’t add more than 5 links in a message )
Hi,
There’s something about how proxying works in Kong that I think I understand but still not 100% sure, would be great if someone here can verify it for me.
So, let’s say I have a service with the url ttp://myservice.com, and I want to expose one API from this service: /reports/{reportid}/status
meaning that the behavior i’m looking for is that given that my Kong address is ttp://my.kong.com, then if a client will access to ttp://my.kong.com/reports/50/status then Kong will proxy the request to ttp://myservice.com/reports/50/status.
from my understanding I have only 2 options how to apply such behavior in Kong:
- create a service with the url “ttp://myservice.com/reports/50/status” and then assign a route with the path “/reports/50/status” to this service/
- use the enterprise transformer plugin / write my own customized transformer plugin.
am I right?
There ISN’T an option (without any plugins) to create a service with the url “http://myservice.com” and assign a route to it with the path “/reports” and then everything that will be matched to this route will be forwarded using THE SAME REQUEST PATH, as in:
ttp://my.kong.com/reports/aaa/bbb --> ttp://myservice.com/reports/aaa/bbb
ttp://my.kong.com/reports/ccc?key=value --> ttp://myservice.com/reports/ccc?key=value
and so on, all using only one service and one route attached to it.
Did i get it right? Am I missing anything?
Thanks!