reiniciar por room, finished ya no estorba, control total desde el dashboard
This commit is contained in:
@@ -527,14 +527,17 @@ adminRouter.get("/admin/uuids-with-names", async (req: Request, res: Response) =
|
||||
|
||||
// SSE endpoint for real-time dashboard updates
|
||||
adminRouter.get("/dashboard-stream", (req: Request, res: Response) => {
|
||||
// Set SSE headers
|
||||
// Set SSE headers (hardened for reverse proxies)
|
||||
res.writeHead(200, {
|
||||
'Content-Type': 'text/event-stream',
|
||||
'Cache-Control': 'no-cache',
|
||||
'Cache-Control': 'no-cache, no-transform', // avoid proxy transformations
|
||||
'Connection': 'keep-alive',
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Headers': 'Cache-Control'
|
||||
'Access-Control-Allow-Headers': 'Cache-Control',
|
||||
'X-Accel-Buffering': 'no' // hint nginx to disable buffering
|
||||
});
|
||||
// Flush headers immediately so proxies establish the stream
|
||||
try { (res as any).flushHeaders?.(); } catch {}
|
||||
|
||||
// Add client to our set
|
||||
sseClients.add(res);
|
||||
|
||||
Reference in New Issue
Block a user