diff options
| author | JP Dillingham <jp@dillingham.me> | 2024-11-03 16:48:14 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2024-11-03 16:48:14 -0600 |
| commit | ca38ca6286da1c8bb8185f7678ef7fe884ae1f07 (patch) | |
| tree | 7a8fe3f52a6c068f6ec4098af09aa5a334ff6d7a | |
| parent | 4d5c0e437065e104a784b7080915ca2bfdd2218c (diff) | |
| download | slskd-ca38ca6286da1c8bb8185f7678ef7fe884ae1f07.tar.gz | |
use the ssl-disabled httpclientfactory if option is set
| -rw-r--r-- | src/slskd/Integrations/Webhooks/WebhookService.cs | 6 |
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) |
