mirror of
https://github.com/prometheus/prometheus.git
synced 2025-10-15 17:41:19 +02:00
Merge pull request #1899 from amorken/master
Trim stray whitespace from bearer token file
This commit is contained in:
commit
fcac52ebbf
@ -98,7 +98,7 @@ func newHTTPClient(cfg *config.ScrapeConfig) (*http.Client, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to read bearer token file %s: %s", cfg.BearerTokenFile, err)
|
||||
}
|
||||
bearerToken = string(b)
|
||||
bearerToken = strings.TrimSpace(string(b))
|
||||
}
|
||||
|
||||
if len(bearerToken) > 0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user