1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-17 10:45:49 +02:00

Fixed: Unnecessary certificate validation errors on localhost/loopback

closes #4215
This commit is contained in:
Taloth Saldono 2021-01-14 22:04:54 +01:00
parent 5668152d6f
commit c28cafba0a

View File

@ -41,6 +41,11 @@ private bool ShouldByPassValidationError(object sender, X509Certificate certific
return true;
}
if (request.RequestUri.Host == "localhost" || request.RequestUri.Host == "127.0.0.1")
{
return true;
}
var ipAddresses = GetIPAddresses(request.RequestUri.Host);
var certificateValidation = _configService.CertificateValidation;
@ -55,7 +60,6 @@ private bool ShouldByPassValidationError(object sender, X509Certificate certific
return true;
}
_logger.Error("Certificate validation for {0} failed. {1}", request.Address, sslPolicyErrors);
return false;