chore: debug auth
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 10s

This commit is contained in:
2026-10-26 01:05:47 +01:00
parent c6b08b4812
commit 64d0d3dcfe
2 changed files with 3 additions and 8 deletions
+2 -7
View File
@@ -29,7 +29,8 @@ async function verifyAccess(headers: IncomingHttpHeaders): Promise<boolean> {
try {
await jwtVerify(token, jwks, { issuer: TEAM, audience: AUD });
return true;
} catch {
} catch (e) {
console.error("Access JWT rejected:", (e as Error).message);
return false;
}
}
@@ -78,12 +79,6 @@ app.get("*", (req, res, next) => {
});
const server = createServer(app);
// ---------------------------------------------------------------------------
// WebSocket : routage manuel des upgrades.
// AVANT : new WebSocketServer({ server, path: "/api/talk" }) répondait 400 à tout
// upgrade d'un autre chemin, y compris /go2rtc/api/ws (flux MSE).
// ---------------------------------------------------------------------------
const wss = new WebSocketServer({ noServer: true, maxPayload: 1 << 20 });
server.on("upgrade", async (req, socket, head) => {