-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Consider using ForwardedHeaderFilter #5677
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
Comments
I'm not sure that we should change the current |
@philwebb Thanks for the feedback. I think there are a few advantages to using Spring's ForwardedHeaderFilter:
|
@rwinch Are there any downsides? Filter ordering for example? or performance? |
I doubt that performance would be an issue. The only limitation I can think of is that a Filter would not wrap a |
I am against this, for now at least. When Undertow's native support is used, the |
@wilkinsona What is looking at the |
Nothing in Undertow itself, other than its |
Sorry, but we feel the current approach is probably better overall. |
Why not adding |
We've decided to reconsider this option and allow this use case with a enum, as suggested by @kakawait. |
Spring 4.3 added ForwardedHeaderFilter which provides a cross container independent way to support X-Forwarded-* headers.
This is nice because not all containers provide the same support. For example, Tomcat does not support X-Forwarded-Host. Another benefit is that
ForwardedHeaderFilter
allows overriding the context root of the application in the event the proxy uses a different context root than the application. This is helpful to ensure links are rendered correctly.The text was updated successfully, but these errors were encountered: