Useful in cases where Sonarr or Radarr use HTTPS with a self-signed certificate. Normally communication with such an instance would fail since Trash Updater, by default, validates with certificate authorities. This new setting allows you to disable certificate validation when communicating with Sonarr or Radarr, avoiding the need to add a self-signed certificate to your certification store. Use at your own risk. Fixes #20.pull/47/head
parent
d540cf37c9
commit
94b95c1fb4
@ -0,0 +1,15 @@
|
||||
using System.Net.Http;
|
||||
using Flurl.Http.Configuration;
|
||||
|
||||
namespace Common.Networking;
|
||||
|
||||
public class UntrustedCertClientFactory : DefaultHttpClientFactory
|
||||
{
|
||||
public override HttpMessageHandler CreateMessageHandler()
|
||||
{
|
||||
return new HttpClientHandler
|
||||
{
|
||||
ServerCertificateCustomValidationCallback = (_, _, _, _) => true
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Reference in new issue