Skip to content

Commit

Permalink
fix: use correct auth token with consul_agent (#11001)
Browse files Browse the repository at this point in the history
(cherry picked from commit ecf7e94)
  • Loading branch information
bear359 authored and Sebastian Spaink committed Apr 25, 2022
1 parent 596ef74 commit ec401a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inputs/consul_agent/consul_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,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)
Expand Down

0 comments on commit ec401a4

Please sign in to comment.