Skip to content

Commit 4ad3a15

Browse files
authored
Merge pull request #8 from palladiumkenya/feature/ssl
ssl ignore check
2 parents 2399ef3 + d693e82 commit 4ad3a15

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/LiveDWAPI.Infrastructure/Stats/StatsService.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public StatsService(IOptions<ServicesApiOptions> options)
2424
Log.Debug(new string('*',47));
2525
Log.Debug($"Reading STATS API {url}");
2626
Log.Debug(new string('*',47));
27-
using (HttpClient client = new HttpClient())
27+
using (HttpClient client = new HttpClient(IgnoreCertHandler()))
2828
{
2929
try
3030
{
@@ -50,5 +50,13 @@ public StatsService(IOptions<ServicesApiOptions> options)
5050

5151
return sites;
5252
}
53-
53+
54+
private HttpClientHandler IgnoreCertHandler()
55+
{
56+
return new HttpClientHandler()
57+
{
58+
ServerCertificateCustomValidationCallback =
59+
(message, certificate2, arg3, arg4) => true
60+
};
61+
}
5462
}

0 commit comments

Comments
 (0)