fix: 修正Swagger UI在网关下的文档路径
This commit is contained in:
@@ -55,8 +55,9 @@ public static class SwaggerExtensions
|
||||
{
|
||||
foreach (var description in provider.ApiVersionDescriptions)
|
||||
{
|
||||
// 3. 使用相对路径适配反向代理/网关前缀
|
||||
options.SwaggerEndpoint(
|
||||
$"/swagger/{description.GroupName}/swagger.json",
|
||||
$"./{description.GroupName}/swagger.json",
|
||||
$"{settings.Title} {description.ApiVersion}");
|
||||
}
|
||||
// 2. 显示请求耗时
|
||||
|
||||
Reference in New Issue
Block a user