We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2399ef3 + d693e82 commit 4ad3a15Copy full SHA for 4ad3a15
src/LiveDWAPI.Infrastructure/Stats/StatsService.cs
@@ -24,7 +24,7 @@ public StatsService(IOptions<ServicesApiOptions> options)
24
Log.Debug(new string('*',47));
25
Log.Debug($"Reading STATS API {url}");
26
27
- using (HttpClient client = new HttpClient())
+ using (HttpClient client = new HttpClient(IgnoreCertHandler()))
28
{
29
try
30
@@ -50,5 +50,13 @@ public StatsService(IOptions<ServicesApiOptions> options)
50
51
return sites;
52
}
53
-
+
54
+ private HttpClientHandler IgnoreCertHandler()
55
+ {
56
+ return new HttpClientHandler()
57
58
+ ServerCertificateCustomValidationCallback =
59
+ (message, certificate2, arg3, arg4) => true
60
+ };
61
+ }
62
0 commit comments