-
Notifications
You must be signed in to change notification settings - Fork 296
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
Extend DialOptions to allow Host header override #336
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you use Host
in HTTPHeader
?
That does not work unfortunately. |
Sounds good will get this in then after #256 |
Or you know what we could actually check for |
Checking for Should I change the patch? |
Go for it and thank you for your contribution. It's still going to take me a while to merge as I need to take care of #256 |
b06417f
to
f7bed7c
Compare
Thanks @bendiscz |
The standard
http.Request.Host
field allows to override theHost
header that is sent with the HTTP request (URL.Host
is used by default). Such option can be useful in various scenarios, for example when running behind some proxy server.This patch extends the
DialOptions
struct withHost
field that basically does the same.