Fix ACL token usage in consul input plugin (#3376)
This commit is contained in:
committed by
Daniel Nelson
parent
77cc071796
commit
d2f9fc7d8c
@@ -69,6 +69,10 @@ func (c *Consul) createAPIClient() (*api.Client, error) {
|
||||
config.Datacenter = c.Datacentre
|
||||
}
|
||||
|
||||
if c.Token != "" {
|
||||
config.Token = c.Token
|
||||
}
|
||||
|
||||
if c.Username != "" {
|
||||
config.HttpAuth = &api.HttpBasicAuth{
|
||||
Username: c.Username,
|
||||
|
||||
Reference in New Issue
Block a user