diff --git a/WorkFlow.API/Program.cs b/WorkFlow.API/Program.cs index ef4c685..09f5062 100644 --- a/WorkFlow.API/Program.cs +++ b/WorkFlow.API/Program.cs @@ -35,7 +35,7 @@ builder.Services.AddSwaggerGen(); var app = builder.Build(); // Configure the HTTP request pipeline. -if (app.Environment.IsDevelopment()) +if (app.IsDevOrDiP() && app.Configuration.GetValue("EnableSwagger")) { app.UseSwagger(); app.UseSwaggerUI(); diff --git a/WorkFlow.API/appsettings.json b/WorkFlow.API/appsettings.json index d3fe520..f5166d5 100644 --- a/WorkFlow.API/appsettings.json +++ b/WorkFlow.API/appsettings.json @@ -1,4 +1,6 @@ { + "DiPMode": true, + "EnableSwagger": true, "Logging": { "LogLevel": { "Default": "Information",