Skip to content

Commit

Permalink
Fix Host header in http req
Browse files Browse the repository at this point in the history
  • Loading branch information
syepes authored and mstoykov committed Jan 13, 2023
1 parent 191dd1b commit 2794598
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions remote_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2794598

Please sign in to comment.