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:
kaso17
2018-07-02 13:05:24 +02:00
committed by GitHub
parent bc965b1a0c
commit bcc1dc1948
5 changed files with 332 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ using Autofac.Extensions.DependencyInjection;
using Jackett.Common.Models.Config;
using Jackett.Common.Plumbing;
using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils.Clients;
using Jackett.Server.Middleware;
using Jackett.Server.Services;
using Microsoft.AspNetCore.Authentication.Cookies;
@@ -82,6 +83,8 @@ namespace Jackett.Server
builder.RegisterType<ServerService>().As<IServerService>();
builder.RegisterType<ProtectionService>().As<IProtectionService>();
builder.RegisterType<ServiceConfigService>().As<IServiceConfigService>();
if (runtimeSettings.ClientOverride == "httpclientnetcore")
builder.RegisterType<HttpWebClientNetCore>().As<WebClient>();
IContainer container = builder.Build();
Helper.ApplicationContainer = container;