Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 55921dd

Browse files
author
Angelo Pirola
committed
Fix condizione MapHealthChecks
1 parent 7097632 commit 55921dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NET6CustomLibrary/Extensions/DependencyInjection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public static IServiceCollection AddSqlServerHealthChecks(this IServiceCollectio
233233

234234
public static IEndpointRouteBuilder AddDatabaseHealthChecks(this IEndpointRouteBuilder builder, string pattern, bool allowAnonymous = false)
235235
{
236-
if (allowAnonymous)
236+
if (!allowAnonymous)
237237
{
238238
builder.MapHealthChecks(pattern, new HealthCheckOptions
239239
{

0 commit comments

Comments
 (0)