diff --git a/plugins/inputs/httpjson/httpjson.go b/plugins/inputs/httpjson/httpjson.go index ee5e296d309a2..3070e6338aeb8 100644 --- a/plugins/inputs/httpjson/httpjson.go +++ b/plugins/inputs/httpjson/httpjson.go @@ -201,7 +201,11 @@ func (h *HttpJson) sendRequest(serverURL string) (string, float64, error) { // Add header parameters for k, v := range h.Headers { - req.Header.Add(k, v) + if strings.ToLower(k) == "host" { + req.Host = v + } else { + req.Header.Add(k, v) + } } start := time.Now()