From 08001fd684099ebad8cec5b4eb5c35c07b283f3c Mon Sep 17 00:00:00 2001 From: glax Date: Wed, 24 May 2023 22:55:32 +0200 Subject: [PATCH] SSL cert error --- Tranga/Komga.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Tranga/Komga.cs b/Tranga/Komga.cs index 317234c..f7834d5 100644 --- a/Tranga/Komga.cs +++ b/Tranga/Komga.cs @@ -89,7 +89,13 @@ public class Komga { public static Stream MakeRequest(string url, string auth) { - HttpClient client = new(); + HttpClientHandler clientHandler = new HttpClientHandler(); + clientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, sslPolicyErrors) => + { + return true; + }; + HttpClient client = new(clientHandler); + HttpRequestMessage requestMessage = new HttpRequestMessage { Method = HttpMethod.Get,