Skip to content

Commit ecf7e94

Browse files
authored
fix: use correct auth token with consul_agent (#11001)
1 parent 1898077 commit ecf7e94

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/inputs/consul_agent/consul_agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (n *ConsulAgent) loadJSON(url string) (*AgentInfo, error) {
8686
return nil, err
8787
}
8888

89-
req.Header.Set("Authorization", "X-Consul-Token "+n.Token)
89+
req.Header.Add("X-Consul-Token", n.Token)
9090
req.Header.Add("Accept", "application/json")
9191

9292
resp, err := n.roundTripper.RoundTrip(req)

0 commit comments

Comments
 (0)