Skip to content

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

Description

@SchmitzOri

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions