Skip to content

Instantly share code, notes, and snippets.

@explorer14
Created December 25, 2018 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save explorer14/2ef1d107e7fd7ea4a9501f659ad74c52 to your computer and use it in GitHub Desktop.
Save explorer14/2ef1d107e7fd7ea4a9501f659ad74c52 to your computer and use it in GitHub Desktop.
public void Configure(
IApplicationBuilder app,
IHostingEnvironment env)
{
app.UseHealthChecks("/health/status",
new HealthCheckOptions
{
ResponseWriter = async (httpContext, healthReport) =>
{
var healthReportJson = JsonConvert.SerializeObject(healthReport);
await httpContext.Response.WriteAsync(
healthReportJson, Encoding.UTF8);
}
});
// rest of the pipeline
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment