@ -228,6 +228,14 @@ namespace HttpClientStudy.WebApp
app.UseAuthorization();
#endregion
//默认Swagger页
app.Map("/", async context =>
{
context.Response.Redirect($"{context.Request.PathBase}/swagger/index.html");
await Task.CompletedTask;
});
app.Run();
}
@ -51,4 +51,12 @@ applicationLifetime.ApplicationStopped.Register(() =>