Skip to content

Commit 86ce9a3

Browse files
committed
fix(uwp): ignore certificate
1 parent 0f8f0be commit 86ce9a3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lavcode.Service.Api/ConService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,15 @@ public IConService SetTimeout(int timeout)
8181
{
8282
new KeyValuePair<string, string>("platform", "uwp"),
8383
new KeyValuePair<string, string>("version", _version??""),
84-
new KeyValuePair<string, string>("Authorization", _token??""),
84+
new KeyValuePair<string, string>("Authorization", string.IsNullOrEmpty(_token) ? "" : $"Bearer {_token}"),
8585
};
8686

8787
private HttpClient GetHttpClient()
8888
{
89-
HttpClient client = new(new HttpClientHandler()
89+
HttpClient client = new(new HttpClientHandler
9090
{
9191
UseProxy = UseProxy?.Invoke() ?? false,
92+
ServerCertificateCustomValidationCallback = (_, _, _, _) => true,
9293
})
9394
{
9495
Timeout = _timeout ?? TimeSpan.FromSeconds(20),

0 commit comments

Comments
 (0)