aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Integrations/Webhooks
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2024-11-03 16:48:14 -0600
committerJP Dillingham <jp@dillingham.me>2024-11-03 16:48:14 -0600
commitca38ca6286da1c8bb8185f7678ef7fe884ae1f07 (patch)
tree7a8fe3f52a6c068f6ec4098af09aa5a334ff6d7a /src/slskd/Integrations/Webhooks
parent4d5c0e437065e104a784b7080915ca2bfdd2218c (diff)
downloadslskd-ca38ca6286da1c8bb8185f7678ef7fe884ae1f07.tar.gz
use the ssl-disabled httpclientfactory if option is set
Diffstat (limited to 'src/slskd/Integrations/Webhooks')
-rw-r--r--src/slskd/Integrations/Webhooks/WebhookService.cs6
1 files changed, 5 insertions, 1 deletions
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)