Set user agent when requesting http config (#7752)

This commit is contained in:
Daniel Nelson 2020-07-01 12:52:05 -07:00 committed by GitHub
parent 65a0bf3e0a
commit 1b1382cabf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -866,6 +866,7 @@ func fetchConfig(u *url.URL) ([]byte, error) {
req.Header.Add("Authorization", "Token "+v)
}
req.Header.Add("Accept", "application/toml")
req.Header.Set("User-Agent", internal.ProductToken())
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, err