Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't set ServerCertificateCustomValidationCallback on Browser
  • Loading branch information
MihaZupan committed Sep 1, 2022
commit d7c4f6cb24482dbb0a5c83a60f3ae053522e49c5
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ protected static async Task<WebSocketReceiveResult> ReceiveEntireMessageAsync(We

internal HttpMessageInvoker? GetInvoker()
{
var handler = new HttpClientHandler
var handler = new HttpClientHandler();

if (PlatformDetection.IsNotBrowser)
{
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};
handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
}

ConfigureCustomHandler?.Invoke(handler);

Expand Down