Set host header if configured on http output (#5810)
This commit is contained in:
parent
6b5162d0d2
commit
93be5759d5
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue