diff --git a/TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI/Startup.cs b/TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI/Startup.cs index 5733b9b..51b8456 100644 --- a/TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI/Startup.cs +++ b/TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI/Startup.cs @@ -10,13 +10,32 @@ namespace TransactionProcessor.HealthChecksUI { + using System.Net.Http; + public class Startup { // This method gets called by the runtime. Use this method to add services to the container. // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices(IServiceCollection services) { - services.AddHealthChecksUI().AddInMemoryStorage(); + services.AddHealthChecksUI(settings => + { + settings.UseApiEndpointHttpMessageHandler(ApiEndpointHttpHandler); + }).AddInMemoryStorage(); + } + + private HttpClientHandler ApiEndpointHttpHandler(IServiceProvider arg) + { + return new HttpClientHandler + { + ServerCertificateCustomValidationCallback = (message, + cert, + chain, + errors) => + { + return true; + } + }; } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI/appsettings.json b/TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI/appsettings.json index a9940a6..c861484 100644 --- a/TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI/appsettings.json +++ b/TransactionProcessor.HealthChecksUI/TransactionProcessor.HealthChecksUI/appsettings.json @@ -27,7 +27,7 @@ }, { "Name": "Estate Management UI", - "Uri": "http://192.168.0.133:5004/health" + "Uri": "https://192.168.0.133:5004/health" }, { "Name": "Estate Reporting Service", @@ -50,7 +50,7 @@ // "Uri": "http://192.168.0.133:5009/health" //} ], - "EvaluationTimeInSeconds": 10, + "EvaluationTimeInSeconds": 300, "MinimumSecondsBetweenFailureNotifications": 60 } }