Commit be69cfb9 by Archer

fix: 请求头

parent 6244f6c1
......@@ -80,6 +80,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
);
// 创建响应流
res.setHeader('Content-Type', 'text/event-stream;charset-utf-8');
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('X-Accel-Buffering', 'no');
res.setHeader('Cache-Control', 'no-cache, no-transform');
const pass = new PassThrough();
pass.pipe(res);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment