Browse Source

added a dev environment check

dev
Benjamin Arhen 1 year ago
parent
commit
e47856e4bf
  1. 8
      Cloud_Manager/Program.cs

8
Cloud_Manager/Program.cs

@ -42,11 +42,15 @@ builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "SecureSwagger v1"));
}else
{
app.UseHttpsRedirection();
}
app.UseKeyValidation();
app.UseAuthentication();

Loading…
Cancel
Save