diff --git a/Newsbot.Collector.Api/Newsbot.Collector.Api.csproj b/Newsbot.Collector.Api/Newsbot.Collector.Api.csproj index 32ea9fc..0f5fc65 100644 --- a/Newsbot.Collector.Api/Newsbot.Collector.Api.csproj +++ b/Newsbot.Collector.Api/Newsbot.Collector.Api.csproj @@ -9,6 +9,7 @@ + diff --git a/Newsbot.Collector.Api/Program.cs b/Newsbot.Collector.Api/Program.cs index de8f258..5f11a88 100644 --- a/Newsbot.Collector.Api/Program.cs +++ b/Newsbot.Collector.Api/Program.cs @@ -1,5 +1,7 @@ using Hangfire; using Hangfire.MemoryStorage; +using HealthChecks.UI.Client; +using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Newsbot.Collector.Domain.Consts; using Newsbot.Collector.Domain.Models; using Newsbot.Collector.Services.Jobs; @@ -51,7 +53,11 @@ SetupRecurringJobs(config, Log.Logger); app.UseAuthorization(); -app.MapHealthChecks("/health"); +app.MapHealthChecks("/health", new HealthCheckOptions +{ + Predicate = _ => true, + ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse +}); app.MapControllers(); app.Run();