add healthcheck endpoint at /health
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2021-02-22 15:28:01 +01:00
parent 80554d9da9
commit 5809918907
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -26,6 +26,7 @@ namespace pwt_0x01_ng
// This method gets called by the runtime. Use this method to add services to the container. // This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
services.AddHealthChecks();
services.Configure<CookiePolicyOptions>(options => services.Configure<CookiePolicyOptions>(options =>
{ {
// This lambda determines whether user consent for non-essential cookies is needed for a given request. // This lambda determines whether user consent for non-essential cookies is needed for a given request.
@ -121,6 +122,7 @@ namespace pwt_0x01_ng
name: "default", name: "default",
pattern: "{controller=Products}/{action=Details}/{id?}" pattern: "{controller=Products}/{action=Details}/{id?}"
); );
endpoints.MapHealthChecks("/health");
}); });
app.UseStaticFiles(); app.UseStaticFiles();