Skip to content

Commit

Permalink
fix: 错误地把调试代码上传
Browse files Browse the repository at this point in the history
  • Loading branch information
SALTWOOD committed Sep 22, 2024
1 parent cb69b31 commit 9739534
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CSharp-OpenBMCLAPI/Modules/HttpRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ static HttpRequest()
BaseAddress = new Uri(ClusterRequiredData.Config.CenterServerAddress)
};
// 添加UserAgent,用于标识请求来源
//string ua = $"openbmclapi-cluster/{ClusterRequiredData.Config.clusterVersion} (CSharp-OpenBMCLAPI; .NET runtime v{Environment.Version}; {Environment.OSVersion}, {System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture}; {System.Globalization.CultureInfo.InstalledUICulture.Name})";
string ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0";
string ua = $"openbmclapi-cluster/{ClusterRequiredData.Config.clusterVersion} (CSharp-OpenBMCLAPI; .NET runtime v{Environment.Version}; {Environment.OSVersion}, {System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture}; {System.Globalization.CultureInfo.InstalledUICulture.Name})";
client.DefaultRequestHeaders.Add("User-Agent", ua);
Console.WriteLine($"User-Agent: {ua}");
}
Expand Down

0 comments on commit 9739534

Please sign in to comment.