forked from wanderer/pwt-0x01-ng
add healthcheck endpoint at /health
This commit is contained in:
parent
80554d9da9
commit
5809918907
@ -26,6 +26,7 @@ namespace pwt_0x01_ng
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddHealthChecks();
|
||||
services.Configure<CookiePolicyOptions>(options =>
|
||||
{
|
||||
// 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",
|
||||
pattern: "{controller=Products}/{action=Details}/{id?}"
|
||||
);
|
||||
endpoints.MapHealthChecks("/health");
|
||||
});
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
Loading…
Reference in New Issue
Block a user