Chore: Optionen zur Aktivierung von Swagger über die appsettings.json in der Produktion hinzugefügt.

This commit is contained in:
Developer 02 2024-10-25 11:30:22 +02:00
parent 02a7120413
commit 27f68df6d7
2 changed files with 3 additions and 1 deletions

View File

@ -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<bool>("EnableSwagger"))
{
app.UseSwagger();
app.UseSwaggerUI();

View File

@ -1,4 +1,6 @@
{
"DiPMode": true,
"EnableSwagger": true,
"Logging": {
"LogLevel": {
"Default": "Information",