mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
fix custom certificate validation handler (#3297)
* fix netcore custom certificate validator * conditional HttpWebClientNetCore register * deprecate IgnoreSslErrors option * Use httpclient when running full framework
This commit is contained in:
@@ -14,7 +14,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Jackett.Server
|
||||
{
|
||||
@@ -48,7 +48,16 @@ namespace Jackett.Server
|
||||
if (string.IsNullOrEmpty(options.Client))
|
||||
{
|
||||
//TODO: Remove libcurl once off owin
|
||||
options.Client = "httpclient";
|
||||
bool runningOnDotNetCore = RuntimeInformation.FrameworkDescription.IndexOf("Core", StringComparison.OrdinalIgnoreCase) >= 0;
|
||||
|
||||
if (runningOnDotNetCore)
|
||||
{
|
||||
options.Client = "httpclientnetcore";
|
||||
}
|
||||
else
|
||||
{
|
||||
options.Client = "httpclient";
|
||||
}
|
||||
}
|
||||
|
||||
Settings = options.ToRunTimeSettings();
|
||||
|
Reference in New Issue
Block a user