From fc2296c5d11f9f7a430b4210d3b9a33c9c0476f1 Mon Sep 17 00:00:00 2001 From: DismissedLight <1686188646@qq.com> Date: Tue, 6 Feb 2024 21:58:41 +0800 Subject: [PATCH] change header value --- .../Controller/GithubAuthorizationController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Snap.Hutao.Server/Snap.Hutao.Server/Controller/GithubAuthorizationController.cs b/src/Snap.Hutao.Server/Snap.Hutao.Server/Controller/GithubAuthorizationController.cs index 09fad2b..82681d4 100644 --- a/src/Snap.Hutao.Server/Snap.Hutao.Server/Controller/GithubAuthorizationController.cs +++ b/src/Snap.Hutao.Server/Snap.Hutao.Server/Controller/GithubAuthorizationController.cs @@ -136,7 +136,7 @@ public async Task 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.UserAgent.Add(new("Snap.Hutao.Server")); + requestMessage.Headers.UserAgent.Add(new("Snap Hutao Server/1.0")); requestMessage.Headers.Authorization = new("Bearer", accessTokenResponse.AccessToken); using (HttpResponseMessage responseMessage = await httpClient.SendAsync(requestMessage))