Skip to content

Commit

Permalink
fix disable flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsonax committed May 24, 2024
1 parent b137143 commit d49bc2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CleanAspCore/AppConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal static void AddAuthServices(this WebApplicationBuilder builder)

internal static void AddSwaggerServices(this WebApplicationBuilder builder)
{
if (!builder.Configuration.GetValue<bool>("DisableOpenApi")) return;
if (builder.Configuration.GetValue<bool?>("DisableOpenApi") == true) return;

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(options =>
Expand Down Expand Up @@ -74,7 +74,7 @@ internal static void AddSwaggerServices(this WebApplicationBuilder builder)

internal static void AddOpenTelemetryServices(this WebApplicationBuilder builder)
{
if (!builder.Configuration.GetValue<bool>("DisableTelemetry")) return;
if (builder.Configuration.GetValue<bool?>("DisableTelemetry") == true) return;

builder.Logging.AddOpenTelemetry(options =>
{
Expand Down

0 comments on commit d49bc2f

Please sign in to comment.