mirror of
https://github.com/status-im/consul.git
synced 2025-01-22 03:29:43 +00:00
Only override headers if they're set
This commit is contained in:
parent
f647569b84
commit
eb65e59741
@ -858,8 +858,9 @@ func (c *Client) newRequest(method, path string) *request {
|
|||||||
header: make(http.Header),
|
header: make(http.Header),
|
||||||
}
|
}
|
||||||
|
|
||||||
r.header = c.config.Header
|
if c.config.Header != nil {
|
||||||
|
r.header = c.config.Header
|
||||||
|
}
|
||||||
if c.config.Datacenter != "" {
|
if c.config.Datacenter != "" {
|
||||||
r.params.Set("dc", c.config.Datacenter)
|
r.params.Set("dc", c.config.Datacenter)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user