Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify health check response #885

Merged
merged 13 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Applications/AdminApi/src/AdminApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
using Backbone.Modules.Devices.Infrastructure.Persistence.Database;
using Backbone.Modules.Devices.Infrastructure.PushNotifications;
using Backbone.Tooling.Extensions;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Logging;
using Serilog;
Expand Down Expand Up @@ -209,8 +208,5 @@ static void Configure(WebApplication app)
app.MapControllers();
app.MapFallbackToFile("{*path:regex(^(?!api/).*$)}", "index.html"); // don't match paths beginning with "api/"

app.MapHealthChecks("/health", new HealthCheckOptions
{
ResponseWriter = HealthCheckWriter.WriteResponse
});
app.MapHealthChecks("/health");
}
6 changes: 1 addition & 5 deletions Applications/ConsumerApi/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
using Backbone.Modules.Tokens.ConsumerApi;
using Backbone.Modules.Tokens.Infrastructure.Persistence.Database;
using Backbone.Tooling.Extensions;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Logging;
Expand Down Expand Up @@ -212,10 +211,7 @@ static void Configure(WebApplication app)
app.UseAuthentication().UseAuthorization();

app.MapControllers();
app.MapHealthChecks("/health", new HealthCheckOptions
{
ResponseWriter = HealthCheckWriter.WriteResponse
});
app.MapHealthChecks("/health");

app.UseResponseCaching();
}
Expand Down
6 changes: 1 addition & 5 deletions Applications/SseServer/src/SseServer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Backbone.SseServer.Controllers;
using Backbone.SseServer.Extensions;
using Backbone.Tooling.Extensions;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Logging;
Expand Down Expand Up @@ -149,10 +148,7 @@ static void Configure(WebApplication app)

app.MapControllers();

app.MapHealthChecks("/health", new HealthCheckOptions
{
ResponseWriter = HealthCheckWriter.WriteResponse
});
app.MapHealthChecks("/health");

app.UseResponseCaching();
}
Expand Down

This file was deleted.