mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
fix: 请求头
This commit is contained in:
parent
6244f6c1fb
commit
be69cfb966
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue