fix: use correct auth token with consul_agent (#11001)

This commit is contained in:
Adam Rowan 2022-04-20 12:51:57 -06:00 committed by GitHub
parent 18980772a9
commit ecf7e948b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ func (n *ConsulAgent) loadJSON(url string) (*AgentInfo, error) {
return nil, err
}
req.Header.Set("Authorization", "X-Consul-Token "+n.Token)
req.Header.Add("X-Consul-Token", n.Token)
req.Header.Add("Accept", "application/json")
resp, err := n.roundTripper.RoundTrip(req)