Use custom certificate validation handler for httpclient2netcore

https://github.com/Jackett/Jackett/issues/5172
This commit is contained in:
flightlevel 2019-05-04 16:18:25 +10:00
parent d7c09e62bd
commit ec985a2318
1 changed files with 3 additions and 0 deletions

View File

@ -130,6 +130,9 @@ namespace Jackett.Common.Utils.Clients
AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate
};
// custom certificate validation handler (netcore version)
clientHandlr.ServerCertificateCustomValidationCallback = ValidateCertificate;
clearanceHandlr.InnerHandler = clientHandlr;
client = new HttpClient(clearanceHandlr);
}