Skip to content

Commit

Permalink
add user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightczx committed Feb 6, 2024
1 parent 3ca0fa6 commit 696f6fc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ public async Task<IActionResult> HandleAuthorizationCallbackAsync([FromQuery(Nam
using (HttpRequestMessage requestMessage = new(HttpMethod.Get, "https://api.github.com/user"))
{
requestMessage.Headers.Accept.Add(new("application/vnd.github+json"));
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessTokenResponse.AccessToken);
requestMessage.Headers.UserAgent.Add(new("Snap.Hutao.Server"));
requestMessage.Headers.Authorization = new("Bearer", accessTokenResponse.AccessToken);

using (HttpResponseMessage responseMessage = await httpClient.SendAsync(requestMessage))
{
Expand Down

0 comments on commit 696f6fc

Please sign in to comment.