From 10e3fc92312b31de000dc910d6ab13867d2231c3 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Fri, 11 Sep 2026 18:10:31 +0100 Subject: [PATCH] fix health checks issues --- EstateManagementUI.BlazorServer/Program.cs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/EstateManagementUI.BlazorServer/Program.cs b/EstateManagementUI.BlazorServer/Program.cs index 2c568b66..2186f7f5 100644 --- a/EstateManagementUI.BlazorServer/Program.cs +++ b/EstateManagementUI.BlazorServer/Program.cs @@ -119,10 +119,12 @@ Uri ValidateAndCreateUri(string url, string configKey) var healthChecks = builder.Services.AddHealthChecks(); if (testMode == TestMode.Disabled) { - healthChecks.AddSecurityService(); + healthChecks.AddSecurityService(Helpers.ApiEndpointHttpHandler); } -healthChecks.AddUrlGroup(estateReportingUri, name: "Estate Reporting API", tags: new[] { "estateapi" }); +healthChecks.AddUrlGroup(estateReportingUri, name: "Estate Reporting API", tags: new[] { "estateapi" }) + .AddTransactionProcessorService() + .AddFileProcessorService(); if (testMode == TestMode.Disabled) { @@ -204,3 +206,19 @@ enum TestMode { BackedByTestDataStore, Full } + +static class Helpers { + public static HttpClientHandler ApiEndpointHttpHandler(IServiceProvider serviceProvider) + { + return new HttpClientHandler + { + ServerCertificateCustomValidationCallback = (message, + cert, + chain, + errors) => + { + return true; + } + }; + } +} \ No newline at end of file