source/App/source/WebApp/Diagnostics/HealthChecks/HealthCheckEndpointRouteBuilderExtensions.cs
/// <summary>
/// Adds the "ready" health checks endpoint to the <see cref="IEndpointRouteBuilder"/>.
/// </summary>
/// <param name="endpoints">The <see cref="IEndpointRouteBuilder"/> to add the health checks endpoint to.</param>
/// <returns>A convention routes for the health checks endpoint.</returns>
Adds the "ready" health checks endpoint to the .
Adds the " ready " health checks endpoint to the .
public static IEndpointConventionBuilder MapReadyHealthChecks(this IEndpointRouteBuilder endpoints)
        {
            return endpoints
                .MapHealthChecks(
                    HealthChecksConstants.ReadyHealthCheckEndpointRoute,
                    new HealthCheckOptions { Predicate = r => !r.Name.Equals(HealthChecksConstants.LiveHealthCheckName) })
                .WithMetadata(new AllowAnonymousAttribute());
        }
public static IEndpointConventionBuilder MapReadyHealthChecks ( this IEndpointRouteBuilder endpoints ) { return endpoints . MapHealthChecks ( HealthChecksConstants . ReadyHealthCheckEndpointRoute , new HealthCheckOptions { Predicate = r => ! r . Name . Equals ( HealthChecksConstants . LiveHealthCheckName ) } ) . WithMetadata ( new AllowAnonymousAttribute ( ) ) ; }
Adds the "ready" health checks endpoint to the .
Adds the " ready " health checks endpoint to the .
// Health check endpoints must allow anonymous access so we can use them with Azure monitoring: // https://docs.microsoft.com/en-us/azure/app-service/monitor-instances-health-check#authentication-and-security
A convention routes for the health checks endpoint.
A convention routes for the health checks endpoint .
IEndpointRouteBuilder
this
endpoints
The  to add the health checks endpoint to.
The to add the health checks endpoint to .