feat: add mdtodo v3s microservice

This commit is contained in:
Codex
2026-05-16 03:27:22 +00:00
parent 7b86eb4217
commit 502f5971b1
18 changed files with 1383 additions and 5 deletions
+7
View File
@@ -101,6 +101,13 @@ async function route(req: Request, server: Server<WsData>): Promise<Response | u
async function providerRoute(req: Request, server: Server<WsData>): Promise<Response | undefined> {
const url = new URL(req.url);
if (url.pathname === "/" || url.pathname === "/health") {
return jsonResponse({
ok: true,
service: "unidesk-provider-ingress",
activeSocketCount: ctx.activeProviders.size,
});
}
if (url.pathname === "/ws/provider") {
const token = url.searchParams.get("token") ?? req.headers.get("x-provider-token");
if (token !== config().providerToken) return jsonResponse({ ok: false, error: "invalid provider token" }, 401);