We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have setup the latest docker https://github.com/Mashape/docker-kong/blob/0.7.0/Dockerfile
curl -i -X POST --url http://localhost:8001/apis/ --data 'name=myservice' --data 'preserve_host=true' --data 'strip_request_path=true' --data 'upstream_url=http://myservice:6666' --data 'request_path=/myapipath'
curl -X POST 'localhost:8000/myapipath/account' -H 'Content-Type: application/json' -d '{"content": "content"}'
Expected result: all the headers should be sent and they should correspond with the POSTed values of the API.
Actual result: Kong is not adding these two headers when forwarding to and api. which causes this http://stackoverflow.com/questions/30584242/hateoas-paths-are-invalid-when-using-an-api-gateway-in-a-spring-boot-app issue.
Local solution:
I hard coded the values in the kong.yml based on https://getkong.org/docs/0.7.x/configuration/
proxy_set_header X-Forwarded-Host localhost:8000; proxy_set_header X-Forwarded-Prefix /myapipath;
And then it works.
The text was updated successfully, but these errors were encountered:
Why not just use for the scenario a request transformer plugin to add headers?
Sorry, something went wrong.
Closing #1150
f04232e
Merge pull request #1180 from Mashape/feat/forwarded-headers
ef674d0
Will land in 0.8.1
No branches or pull requests
I have setup the latest docker https://github.com/Mashape/docker-kong/blob/0.7.0/Dockerfile
curl -i -X POST
--url http://localhost:8001/apis/
--data 'name=myservice'
--data 'preserve_host=true'
--data 'strip_request_path=true'
--data 'upstream_url=http://myservice:6666'
--data 'request_path=/myapipath'
curl -X POST 'localhost:8000/myapipath/account'
-H 'Content-Type: application/json'
-d '{"content": "content"}'
Expected result: all the headers should be sent and they should correspond with the POSTed values of the API.
Actual result:
Kong is not adding these two headers when forwarding to and api.
which causes this http://stackoverflow.com/questions/30584242/hateoas-paths-are-invalid-when-using-an-api-gateway-in-a-spring-boot-app issue.
Local solution:
I hard coded the values in the kong.yml based on https://getkong.org/docs/0.7.x/configuration/
proxy_set_header X-Forwarded-Host localhost:8000;
proxy_set_header X-Forwarded-Prefix /myapipath;
And then it works.
The text was updated successfully, but these errors were encountered: