Skip to content

Commit

Permalink
feat(web): expose healthcheck endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Jul 3, 2024
1 parent a44c143 commit e8a492c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Sitko.Core.App.Web/WebApplicationBuilderExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
Expand Down Expand Up @@ -66,6 +67,10 @@ public static WebApplication MapSitkoCore(this WebApplication webApplication)
}
}

webApplication.MapHealthChecks("/health/startup");
webApplication.MapHealthChecks("/healthz", new HealthCheckOptions { Predicate = _ => false });
webApplication.MapHealthChecks("/ready", new HealthCheckOptions { Predicate = _ => false });

var webModules =
ModulesHelper.GetEnabledModuleRegistrations(applicationContext, applicationModuleRegistrations)
.Select(r => r.GetInstance())
Expand Down

0 comments on commit e8a492c

Please sign in to comment.