mirror of
https://github.com/prymitive/karma
synced 2026-08-21 11:46:31 +00:00
Remove Host header attribute from proxied request (#252)
Explicitly set hostame for proxied requests
This commit is contained in:
committed by
Łukasz Mierzwa
parent
4debfd3560
commit
24933bc93a
@@ -35,6 +35,10 @@ func NewAlertmanagerProxy(alertmanager *alertmanager.Alertmanager) (*httputil.Re
|
||||
// upstream, there's a gzip middleware that's global so we don't want it
|
||||
// to gzip twice
|
||||
req.Header.Del("Accept-Encoding")
|
||||
|
||||
// set hostname of proxied target
|
||||
req.Host = upstreamURL.Host
|
||||
|
||||
log.Debugf("[%s] Proxy request for %s", alertmanager.Name, req.URL.Path)
|
||||
},
|
||||
Transport: alertmanager.HTTPTransport,
|
||||
|
||||
Reference in New Issue
Block a user