-
Notifications
You must be signed in to change notification settings - Fork 353
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
ovverride host header in netty #5217
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When we make the oubound rest call we have a requirement to use the NAT IP address instead of the actual host name. When making such calls we need to pass the host header for the call to succeed. But currently in netty there is no provision to include the host header. Netty adds a host header which it derives from the Uri. If we explictly add a host header in the request ,netty adds one more host header which results in a bad request.
We need a way to override the hostheader in the request.
code from NettyConnector which sets the header:
nettyRequest.headers().add(HttpHeaderNames.HOST, jerseyRequest.getUri().getHost());
we are using jersey with netty connector version 2.37
The text was updated successfully, but these errors were encountered: