mirror of https://github.com/hashicorp/consul
Only override headers if they're set
parent
f647569b84
commit
eb65e59741
|
@ -858,8 +858,9 @@ func (c *Client) newRequest(method, path string) *request {
|
|||
header: make(http.Header),
|
||||
}
|
||||
|
||||
r.header = c.config.Header
|
||||
|
||||
if c.config.Header != nil {
|
||||
r.header = c.config.Header
|
||||
}
|
||||
if c.config.Datacenter != "" {
|
||||
r.params.Set("dc", c.config.Datacenter)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue