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.

honor X-Forwarded-Host header for url computation

See original GitHub issue

This issue is similar to #535 in that it deals with X-Forwarded* headers being inspected during url construction. The X-Forwarded-Host header is extremely useful if you’re behind a reverse proxy and need HATEOAS links to contain the proper host. Otherwise, you’re forced to statically define a crnk.domain-name which may not always be feasible / desirable.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
remmeiercommented, Oct 23, 2019

CrbkBoot or CrnkBootConfigurer allows to set a new one

Erik Smith notifications@github.com schrieb am Mi., 23. Okt. 2019, 14:53:

@remmeier https://github.com/remmeier I’ve confirmed that the updated (auto) configuration of Tomcat via Spring Boot 2.2.0 is working as expected in regards to the X-Forwarded-Host header. However, I may need to provide my own ServiceUrlProvider since the context root of my proxy is different than the implementation where crnk is running. Do you have any instructions / tips / hints on how I would go about doing that?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/crnk-project/crnk-framework/issues/598?email_source=notifications&email_token=AB5DJFONGHSKWU2VRI723PTQQBJN3A5CNFSM4I7QG6ZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECBPYBQ#issuecomment-545455110, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5DJFNAC3UMERULT5ITBITQQBJN3ANCNFSM4I7QG6ZA .

0reactions
datagitliescommented, Oct 28, 2019

@remmeier I was able to get the desired behavior by using Spring Boot 2.2.0 and providing my own ServiceUrlProvider implementation via a CrnkBootConfigurer I’ll go ahead and close this issue. Thanks for you help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

X-Forwarded-Host - HTTP - MDN Web Docs
This header is used for debugging, statistics, and generating location-dependent content and by design it exposes privacy sensitive information, ...
Read more >
HTTP header | X-Forwarded-Host - GeeksforGeeks
The HTTP X-Forwarded-Host header is a request-type header de-facto standard header. This header is used to identify the original request ...
Read more >
Header Description - 华为云
X -Forwarded-Host. Refers to a fact standard used to identify the host request header originally sent by the client. X-Forwarded-For.
Read more >
Spring Boot behind a load balancer using the X-Forwarded ...
In this article you'll discover how to make use of the X-Forwarded headers passed from a load balancer to your Spring Boot application, ......
Read more >
X-Forwarded-Host - Fastly Developer Hub
Shielding Request Protocol Origin Protocol Client Header Note No TLS TLS No Added at edge No No TLS TLS No No TLS TLS Yes Appended
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