From ca38ca6286da1c8bb8185f7678ef7fe884ae1f07 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 3 Nov 2024 16:48:14 -0600 Subject: use the ssl-disabled httpclientfactory if option is set --- src/slskd/Integrations/Webhooks/WebhookService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/slskd/Integrations/Webhooks/WebhookService.cs b/src/slskd/Integrations/Webhooks/WebhookService.cs index 08dfd593..62f097b7 100644 --- a/src/slskd/Integrations/Webhooks/WebhookService.cs +++ b/src/slskd/Integrations/Webhooks/WebhookService.cs @@ -68,7 +68,11 @@ public class WebhookService _ = Task.Run(async () => { var call = webhook.Value.Call; - using var http = HttpClientFactory.CreateClient(); + + using var http = call.IgnoreCertificateErrors + ? HttpClientFactory.CreateClient(Constants.IgnoreCertificateErrors) + : HttpClientFactory.CreateClient(); + http.Timeout = TimeSpan.FromMilliseconds(webhook.Value.Timeout); foreach (var header in call.Headers) -- cgit v1.2.3