Compare commits

..

No commits in common. "a1d2dece573e53f7cdad90f2b6be32fe86a5776c" and "b7be74204674e1ec12bc74c93fc126d807d16a9c" have entirely different histories.

2 changed files with 7 additions and 6 deletions

View File

@ -4,6 +4,6 @@
<PropertyGroup> <PropertyGroup>
<!-- All Fake packages --> <!-- All Fake packages -->
<!-- 清本地nuget缓存:dotnet nuget locals -c http-cache --> <!-- 清本地nuget缓存:dotnet nuget locals -c http-cache -->
<FakePackageVersion>8.0.5.26</FakePackageVersion> <FakePackageVersion>8.0.5.24</FakePackageVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -184,9 +184,12 @@ public class SimpleAdminApiModule : FakeModule
// 静态文件服务(用于头像等上传文件) // 静态文件服务(用于头像等上传文件)
app.UseStaticFiles(); app.UseStaticFiles();
// 路由 - 必须在认证和授权之前;且必须在 UsePathBase 之后 // 路由 - 必须在认证和授权之前
app.UseRouting(); app.UseRouting();
// EventBus Dashboard:必须在 UsePathBase 之后,否则 /admin/eventbus 会 404
app.UseFakeEventBusDashboard();
// OpenAPI 验签需读取原始 Body,允许二次读流 // OpenAPI 验签需读取原始 Body,允许二次读流
app.Use(async (ctx, next) => app.Use(async (ctx, next) =>
{ {
@ -208,10 +211,8 @@ public class SimpleAdminApiModule : FakeModule
// 角色/菜单写操作后失效登录用户信息缓存 // 角色/菜单写操作后失效登录用户信息缓存
app.UseMiddleware<RbacCacheInvalidationMiddleware>(); app.UseMiddleware<RbacCacheInvalidationMiddleware>();
// 端点映射(Dashboard 用 MapGroup,依赖 PathBase 已剥离前缀) // 端点映射
app.MapControllers(); app.MapControllers();
// 必须在 UsePathBase 之后:完整对外路径为 /admin/eventbus
app.UseFakeEventBusDashboard();
app.Services.GetRequiredService<IFeiShuNotificationService>().Send("Application started"); app.Services.GetRequiredService<IFeiShuNotificationService>().Send("Application started");
} }