From 2794598a951ad57f971fe811452c01c98539f0e1 Mon Sep 17 00:00:00 2001 From: Sebastian YEPES Date: Mon, 19 Dec 2022 15:24:16 +0100 Subject: [PATCH] Fix Host header in http req --- remote_write.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/remote_write.go b/remote_write.go index cda9a66..6af525a 100644 --- a/remote_write.go +++ b/remote_write.go @@ -257,6 +257,9 @@ func (c *Client) send(state *lib.State, req []byte) (httpext.Response, error) { for k, v := range c.cfg.Headers { r.Header.Set(k, v) + if k == "Host" { + r.Host = v + } } // explicit config overwrites any previously set matching headers