From 9c772c9780b6d84528871be5e10e99ed357d30c2 Mon Sep 17 00:00:00 2001 From: Luke Lee Date: Fri, 20 Oct 2023 16:17:24 +0800 Subject: [PATCH] Update Program.cs --- Program.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Program.cs b/Program.cs index 44ee388..5d5856c 100644 --- a/Program.cs +++ b/Program.cs @@ -10,14 +10,10 @@ var app = builder.Build(); // Configure the HTTP request pipeline. -if (app.Environment.IsDevelopment()) -{ - app.UseSwagger(); - app.UseSwaggerUI(options => { - options.SwaggerEndpoint("/swagger/v1/swagger.json", "v1"); - options.RoutePrefix = string.Empty; - }); -} +app.UseSwagger(); +app.UseSwaggerUI(options => { + options.SwaggerEndpoint("/swagger/v1/swagger.json", "v1"); +}); app.UseHttpsRedirection();