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 => {