This commit is contained in:
zhaowei.huang
2026-06-23 13:50:25 +08:00
45 changed files with 3126 additions and 35 deletions
+3 -1
View File
@@ -6,7 +6,7 @@ using Microsoft.OpenApi.Models;
using MiGu.Server.Auth;
using MiGu.Server.Configs;
using MiGu.Server.Launcher;
using MiGu.Server.OpenApi;
using MiGu.Server.Persistence;
using Yarp.ReverseProxy.Transforms;
static string? FindSourceContentRoot(string startDir)
@@ -216,6 +216,7 @@ builder.Services.AddSingleton<ConfigStore>();
builder.Services.AddSingleton<OpsAuditStore>();
// OpsController 真实转发 SimpleLite reflection execute 所需的 HttpClient 工厂。
builder.Services.AddHttpClient();
builder.Services.AddPlatformPersistence(builder.Configuration);
// 会话 N+1(启动反转):把 SimpleLite 子进程拉起器接入 DIAuthController 登录成功后按 LaunchMode 调 MaybeStart。
// 配置段绑定 appsettings.json:SimpleLite,可被环境变量 SIMPLELITE__XXX 覆盖。
@@ -223,6 +224,7 @@ builder.Services.Configure<SimpleLiteOptions>(builder.Configuration.GetSection("
builder.Services.AddSingleton<SimpleLiteLauncher>();
var app = builder.Build();
await app.Services.EnsurePlatformDatabaseAsync();
// 启动期主动构造 JwtIssuer / InternalTokenStore:让 secret 校验日志在请求来之前打印。
_ = app.Services.GetRequiredService<JwtIssuer>();