Commit 26215512 authored by 姜春辉's avatar 姜春辉

修正HttpClient池Authorization设置错误的bug

parent e23d7924
......@@ -25,6 +25,12 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote
if (!string.IsNullOrEmpty(_token))
_client.DefaultRequestHeaders.Add("Authorization", $"Bearer {_token}");
return _client;
}, (httpclient) =>
{
var _client = httpclient.Value;
_client.DefaultRequestHeaders.Remove("Authorization");
if (!string.IsNullOrEmpty(_token))
_client.DefaultRequestHeaders.Add("Authorization", $"Bearer {_token}");
});
}
public static async Task<T> GetTAsync<T>(string service)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment