Chore: Optionen zur Aktivierung von Swagger über die appsettings.json in der Produktion hinzugefügt.
This commit is contained in:
parent
02a7120413
commit
27f68df6d7
@ -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();
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
{
|
||||
"DiPMode": true,
|
||||
"EnableSwagger": true,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user