Hi everyone,
I have something that I want to do but I don’t know how. I don’t even know if it is possible. So if someone can answer me, I would be grateful.
Currently, when I am using Kong, which is deployed on my localhost, my curl request looks like curl -i -X GET --url http://localhost:8000 --header 'Host:example'
And this is how I call the API : example
But I would like to know if it is possible to change this.
I would like to call ap1 using a curl like this curl -i -X GET --url http://localhost:8000/example
I tried to create a plugin and in this plugin I changed the header of the request with ngx.set_header("Host","example.com")
When I am looking to the response, it doesn’t display the good service that I try to call but the header that I receive changed to example.com.
Is a solution already exists to call an API with a path and not the Host ?
Thanks