shenyu
shenyu copied to clipboard
[BUG] The host value in the original request header is lost after shenyu forwards it
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
As shown in the figure above, the above figure is the list of headers in the web request output in the back-end application after forwarding by shenyu. The value of the host header is not the value of the host header in the original request.
My deployment environment is as follows:
Expected Behavior
Expect to get the host header value in the original request.
Steps To Reproduce
The deployment environment as described above is reproducible.
Environment
ShenYu version(s):2.4.1
Debug logs
No response
Anything else?
No response
you can used shenyu least version
The latest version still has the problem.
shenyu will remove original host in webclient,
headers.remove(HttpHeaders.HOST);
you can used nettyHttpClient
Yes, I saw that the host header was removed from the webclient plugin. Currently, I modified the plugin and commented out this line, but I don't understand the reason for this.
Yes, I saw that the host header was removed from the webclient plugin. Currently, I modified the plugin and commented out this line, but I don't understand the reason for this.
The latest version has been modified. removed:
headers.remove(HttpHeaders.HOST);