From 9168cd39b83d0edbf190a24112dda8c0246255c5 Mon Sep 17 00:00:00 2001 From: Luke Lee Date: Fri, 20 Oct 2023 12:07:33 +0800 Subject: [PATCH] set route prefix --- Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index 48863a6..03fe308 100644 --- a/Program.cs +++ b/Program.cs @@ -13,7 +13,10 @@ if (app.Environment.IsDevelopment()) { app.UseSwagger(); - app.UseSwaggerUI(); + app.UseSwaggerUI(options => { + options.SwaggerEndpoint("/swagger/v1/swagger.json", "v1"); + options.RoutePrefix = string.Empty; + }); } app.UseHttpsRedirection();