Set host header if configured on http output (#5810)

This commit is contained in:
Greg 2019-05-06 13:13:51 -06:00 committed by Daniel Nelson
parent 6b5162d0d2
commit 93be5759d5
1 changed files with 3 additions and 0 deletions

View File

@ -193,6 +193,9 @@ func (h *HTTP) write(reqBody []byte) error {
req.Header.Set("Content-Encoding", "gzip")
}
for k, v := range h.Headers {
if strings.ToLower(k) == "host" {
req.Host = v
}
req.Header.Set(k, v)
}