Skip to content

Commit

Permalink
added shortcircuit to health endpoint mappins
Browse files Browse the repository at this point in the history
  • Loading branch information
ytqsl committed Jan 12, 2024
1 parent 263e5b7 commit 53d33c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Spd.Presentation.Dynamics/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@

app.UseAuthorization();

app.UseDefaultHttpRequestLogging();
app.MapHealthChecks("/health").ShortCircuit();

app.UseDefaultHttpRequestLogging();
app.MapControllers();
app.MapHealthChecks("/health");

await app.RunAsync();
2 changes: 1 addition & 1 deletion src/Spd.Presentation.Licensing/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@
app.UseMiddleware<UsersMiddleware>();
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();
3 changes: 2 additions & 1 deletion src/Spd.Presentation.Screening/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 53d33c5

Please sign in to comment.