fix streaming
This commit is contained in:
@@ -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`);
|
||||
|
||||
Reference in New Issue
Block a user