fix streaming

This commit is contained in:
2026-05-02 23:09:39 -07:00
parent 94565298d8
commit 2313e560e8
6 changed files with 161 additions and 9 deletions

View File

@@ -914,6 +914,7 @@ export async function registerRoutes(app: FastifyInstance) {
}
reply.raw.writeHead(200, buildSseHeaders(typeof req.headers.origin === "string" ? req.headers.origin : undefined));
reply.raw.flushHeaders();
const send = (event: string, data: any) => {
reply.raw.write(`event: ${event}\n`);