Skip to content

Commit

Permalink
Add User-Agent header to HTTP requests (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmylewis authored Jun 27, 2022
1 parent ed732a8 commit 29a2892
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/LibraryManager/Cache/WebRequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ private HttpClient CreateHttpClient(string url)
#pragma warning restore CA2000 // Dispose objects before losing scope
httpMessageHandler.Proxy = _proxySettings.GetProxy(new Uri(url));
var httpClient = new HttpClient(httpMessageHandler);
httpClient.DefaultRequestHeaders.UserAgent.ParseAdd($"LibraryManager/{ThisAssembly.AssemblyFileVersion}");

return httpClient;
}
Expand Down

0 comments on commit 29a2892

Please sign in to comment.