Browse Source

Merge pull request #5 from Artiume/revert-4-server-validation

Revert "Allow valid https requests in .NET Core"
Artiume 5 years ago
parent
commit
c2db45bad9
1 changed files with 1 additions and 11 deletions
  1. 1 11
      Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs

+ 1 - 11
Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs

@@ -59,17 +59,7 @@ namespace Emby.Server.Implementations.HttpClientManager
 
             if (!_httpClients.TryGetValue(key, out var client))
             {
-                var httpClientHandler = new HttpClientHandler()
-                {
-                    ServerCertificateCustomValidationCallback = (message, cert, chain, errors) =>
-                    {
-                        var success = errors == System.Net.Security.SslPolicyErrors.None;
-                        _logger.LogDebug("Validating certificate {Cert}. Success {1}", cert, success);
-                        return success;
-                    }
-                };
-
-                client = new HttpClient(httpClientHandler)
+                client = new HttpClient()
                 {
                     BaseAddress = new Uri(url)
                 };