From d49bc2fa1753c06c5091633a58a256b542800804 Mon Sep 17 00:00:00 2001 From: Rick van Dam Date: Fri, 24 May 2024 12:41:00 +0200 Subject: [PATCH] fix disable flags --- CleanAspCore/AppConfiguration.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CleanAspCore/AppConfiguration.cs b/CleanAspCore/AppConfiguration.cs index c7dbbc9..f2d9381 100644 --- a/CleanAspCore/AppConfiguration.cs +++ b/CleanAspCore/AppConfiguration.cs @@ -40,7 +40,7 @@ internal static void AddAuthServices(this WebApplicationBuilder builder) internal static void AddSwaggerServices(this WebApplicationBuilder builder) { - if (!builder.Configuration.GetValue("DisableOpenApi")) return; + if (builder.Configuration.GetValue("DisableOpenApi") == true) return; builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(options => @@ -74,7 +74,7 @@ internal static void AddSwaggerServices(this WebApplicationBuilder builder) internal static void AddOpenTelemetryServices(this WebApplicationBuilder builder) { - if (!builder.Configuration.GetValue("DisableTelemetry")) return; + if (builder.Configuration.GetValue("DisableTelemetry") == true) return; builder.Logging.AddOpenTelemetry(options => {