This commit is contained in:
Jeroen
2023-10-18 13:40:35 +02:00
parent 0d7fa405c2
commit a1e7a1c546
2 changed files with 8 additions and 2 deletions

View File

@@ -164,7 +164,7 @@ namespace EonaCat.Logger.Managers
{ {
try try
{ {
using (var httpClient = new HttpClient()) using (var httpClient = new HttpClient(splunkServer.SplunkClientHandler))
{ {
var payload = new var payload = new
{ {

View File

@@ -71,6 +71,12 @@ namespace EonaCat.Logger.SplunkServer
{ {
SplunkHecUrl = splunkHecUrl; SplunkHecUrl = splunkHecUrl;
SplunkHecToken = splunkHecToken; SplunkHecToken = splunkHecToken;
if (httpClientHandler == null)
{
httpClientHandler = new HttpClientHandler();
}
SplunkClientHandler = httpClientHandler; SplunkClientHandler = httpClientHandler;
} }
@@ -82,7 +88,7 @@ namespace EonaCat.Logger.SplunkServer
{ {
HttpClientHandler clientHandler = new HttpClientHandler() HttpClientHandler clientHandler = new HttpClientHandler()
{ {
ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true,
}; };
SplunkClientHandler = clientHandler; SplunkClientHandler = clientHandler;
} }