-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Configure HostHeaderCustomizer #7003
Comments
What does this mean? Are you using something like Proxy Protocol V2 or similar?
Can you explain this in a bit more detail? That hints at a Request Authority issue, either as a bug in
This The As you can see, the use of |
I still don't understand how you managed to make this work in Jetty 7, 8, or 9 without the I'm talking about the APIs ..
Those values come from 1 of two places. The Here it is in Jetty 9.4.44 |
Hi @joakime, The layout in this setup is as follows: I will be able to get an equivalent Jetty 10 configuration tonight after hours when I can switch JETTY_HOME for a few seconds. |
Thank you for that Hmm, I think this might be the technique you are using.
That would be the file in your It looks like this on Jetty 9.4.44 That adds support to the This exists, in pretty much the same way, on Jetty 10.0.7 So lets focus on this PROXY protocol for a bit, as this is the likely path you were using before. On your both your functional Jetty 9 server, and again on your problematic Jetty 10 server, can you capture DEBUG level logging for the named logger That might reveal what's going on with your bad client / remote / src address. |
What do you mean exactly when you say "Jetty 10 keeps sending the response to 10.x.x.x"? Are you perhaps referring to your application responding with a redirect (like a 302 redirect) but it has a response header |
I meant that the browser was getting a wrong Location header of 10.x.x.x and the user becomes stuck. The only change between the two experiments is the value of JETTY_HOME (9.4.44 vs 10.0.7) |
Please see attached output from --list_config from jetty-10 jetty10.txt, and the debug of the proxy-protocol handler. debug.txt |
Issue #7958 announcement (Jetty 9.x losing community support) forced us to deall with this issue. Our configuration is
PS: Jetty is configured with haproxyprotocol v2, httpforward, and HTTP2 (H2C.) Thank you for Jetty server. |
You should not be needing 2 lines, as |
That was what we thought. In fact that was why I decided to leave a comment ... Our config?
And
|
Jetty version
10.0.6
Started ServerConnector@59349a26{[proxy], ([proxy], http/1.1, h2c)}{server:8080}
Java version
openjdk version "17" 2021-09-14
Question
We are trying to upgrade from Jetty 9 to Jetty 10. Jetty is behind HAProxy in our deployment and we leverage haproxy protocol to reduce the pain of getting real client-IP behind multiple intermediate proxies. Jetty 7,8, and 9 worked beautifully. However, Jetty 10 insists on returning the user to the intermediate proxy. That was when we found out about the HostHeaderCustomizer.
So, we created simple module that adds the customizer to our server. The module worked in our test environment but it has no effect on the real McCoy leading us to believe that we are missing something. What should we be doing? We do not use the http-forwarded module in our environment.
http-customizer.mod
[tags]
connector
[depend]
http
[xml]
etc/jetty-http-customizer.xml
jetty-http-customizer.xml
The text was updated successfully, but these errors were encountered: