From cbd066772565631e923bfc2417d167804a950316 Mon Sep 17 00:00:00 2001 From: Jordan Beard Date: Fri, 3 Feb 2023 10:19:05 +0000 Subject: [PATCH] add health check for azure monitoring --- Dfe.PrepareTransfers.Web/Startup.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dfe.PrepareTransfers.Web/Startup.cs b/Dfe.PrepareTransfers.Web/Startup.cs index 466c9b7fe..c7d72b020 100644 --- a/Dfe.PrepareTransfers.Web/Startup.cs +++ b/Dfe.PrepareTransfers.Web/Startup.cs @@ -90,6 +90,7 @@ public void ConfigureServices(IServiceCollection services) services.Configure(options => { options.LowercaseUrls = true; }); services.Configure(GetConfigurationSection()); + services.AddHealthChecks(); AddServices(services, Configuration); AuthorizationPolicyBuilder policyBuilder = SetupAuthorizationPolicyBuilder(); @@ -167,6 +168,8 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseStaticFiles(); + app.UseHealthChecks("/health"); + app.UseRouting(); app.UseSentryTracing();