question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Non-standard proxy forwarded headers are not being parsed

See original GitHub issue

Describe the bug

Non-standard proxy forwarded headers are not being parsed, even though both standard and non-standard forwarded headers configurations are enabled. This behavior contradicts information at https://quarkus.io/guides/vertx#running-behind-a-reverse-proxy.

The corresponding implementation at ForwardedParser.java shows that it will not parse non-standard headers when allowForwarded config is enabled.

Expected behavior

It should work as stated in the documentation

Both configurations related with standard and non-standard headers can be combine. In this case, the Forwarded header will have precedence in presence of both set of headers.

Actual behavior

With both configurations enabled, quarkus server did not parse non-standard header from request.

Configuration

# Add your application.properties here, if applicable.
quarkus:
  http:
    proxy:
      proxy-address-forwarding: true
      allow-forwarded: true
      enable-forwarded-host: true
      enable-forwarded-prefix: true

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alsasiancommented, Sep 14, 2020

@ejba thanks for the clarification. Indeed, I was expecting some kind of failover mechanism to parse custom header when standard header is not provided. I was not sure whether the issue is with the doc or the implementation.

Thanks again for checking 👍.

0reactions
ejbacommented, Sep 14, 2020

@alsasian I am the one shall say thanks here! 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the Forwarded header - NGINX
Traditionally, an HTTP reverse proxy uses non-standard headers to inform the upstream server about the user's IP address and other request properties:.
Read more >
X-Forwarded-For - HTTP - MDN Web Docs
The X-Forwarded-For header is untrustworthy when no trusted reverse proxy (e.g., a load balancer) is between the client and server. If the ...
Read more >
HTTP headers and Classic Load Balancers
Some of the non-standard HTTP headers have an X-Forwarded prefix. Classic Load Balancers support the following X-Forwarded headers.
Read more >
How does the browser know which non-standard request ...
1 Answer 1 ... X-Forwarded-For is added when the request come into a proxy server or load-balancer that hides the main server address...
Read more >
RFC 7239: Forwarded HTTP Extension
"Forwarded" is only for use in HTTP requests and is not to be used in HTTP ... to read information about the last...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found