Created
December 25, 2018 13:19
-
-
Save explorer14/2ef1d107e7fd7ea4a9501f659ad74c52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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