mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
cmd/syncthing: Set User-Agent on upgrade checks
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3093
This commit is contained in:
parent
e8b4286c93
commit
bef2425025
@ -79,7 +79,8 @@ func insecureGet(url, version string) (*http.Response, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header.Set("X-Syncthing-Version", version)
|
||||
|
||||
req.Header.Set("User-Agent", fmt.Sprintf(`syncthing %s (%s %s-%s)`, version, runtime.Version(), runtime.GOOS, runtime.GOARCH))
|
||||
return insecureHTTP.Do(req)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user