From 53d33c50387818195af6d72524aaa472cf6981f5 Mon Sep 17 00:00:00 2001 From: ytqsl Date: Fri, 12 Jan 2024 09:58:01 -0800 Subject: [PATCH] added shortcircuit to health endpoint mappins --- src/Spd.Presentation.Dynamics/Program.cs | 4 ++-- src/Spd.Presentation.Licensing/Program.cs | 2 +- src/Spd.Presentation.Screening/Startup.cs | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Spd.Presentation.Dynamics/Program.cs b/src/Spd.Presentation.Dynamics/Program.cs index e9aec68ac..0fd03a63b 100644 --- a/src/Spd.Presentation.Dynamics/Program.cs +++ b/src/Spd.Presentation.Dynamics/Program.cs @@ -89,9 +89,9 @@ app.UseAuthorization(); -app.UseDefaultHttpRequestLogging(); +app.MapHealthChecks("/health").ShortCircuit(); +app.UseDefaultHttpRequestLogging(); app.MapControllers(); -app.MapHealthChecks("/health"); await app.RunAsync(); \ No newline at end of file diff --git a/src/Spd.Presentation.Licensing/Program.cs b/src/Spd.Presentation.Licensing/Program.cs index f1d57dd71..048e80e0f 100644 --- a/src/Spd.Presentation.Licensing/Program.cs +++ b/src/Spd.Presentation.Licensing/Program.cs @@ -100,10 +100,10 @@ app.UseMiddleware(); app.UseAuthorization(); +app.MapHealthChecks("/health").ShortCircuit(); app.MapControllerRoute( name: "default", pattern: "{controller}/{action=Index}/{id?}"); -app.MapHealthChecks("/health"); app.MapFallbackToFile("index.html"); await app.RunAsync(); \ No newline at end of file diff --git a/src/Spd.Presentation.Screening/Startup.cs b/src/Spd.Presentation.Screening/Startup.cs index f807221c5..3604b6519 100644 --- a/src/Spd.Presentation.Screening/Startup.cs +++ b/src/Spd.Presentation.Screening/Startup.cs @@ -99,12 +99,13 @@ public void SetupHttpRequestPipeline(WebApplication app, IWebHostEnvironment env app.UseAuthorization(); app.ConfigureComponentPipeline(configuration, hostEnvironment, assemblies); + app.MapHealthChecks("/health").ShortCircuit(); + app.UseDefaultHttpRequestLogging(); app.MapControllerRoute( name: "default", pattern: "{controller}/{action=Index}/{id?}"); - app.MapHealthChecks("/health"); app.MapFallbackToFile("index.html"); app.Run();