Skip to content
New issue

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

"X-Forwarded-Host" header is ignored in version 0.2.0 #61

Open
SchmitzOri opened this issue Sep 25, 2024 · 0 comments
Open

"X-Forwarded-Host" header is ignored in version 0.2.0 #61

SchmitzOri opened this issue Sep 25, 2024 · 0 comments

Comments

@SchmitzOri
Copy link

Description

In version 0.2.0, when passing a "X-Forwarded-Host" header to the "/anything" endpoint (and perhaps other endpoints), it is does not affect the "url" property of the response body.

Steps to Reproduce

  1. Run the v0.2.0 docker container: docker run -p 61234:80 kong/httpbin:0.2.0
  2. Make a get request to "http://localhost:61234/anything", including the header "X-Forwarded-Host" with the value "localhost:8299"
  3. The response body contains "url": "http://localhost:61234/anything"

Expected Behavior

The response body should contain "url": "http://localhost:8299/anything". This is the behavior in both local docker kong/httpbin:v0.1.0 and when calling httpbin.org/anything.

Actual Behavior

The response body contains "url": "http://localhost:61234/anything", ignoring the value passed in X-Forwarded-Host header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant