fix: #2485 one-time-use body

This commit is contained in:
Yidadaa 2023-08-08 21:36:37 +08:00
parent 4ab9141429
commit b14c5cd89c

View File

@ -43,6 +43,8 @@ export async function requestOpenai(req: NextRequest) {
}, },
method: req.method, method: req.method,
body: req.body, body: req.body,
// to fix #2485: https://stackoverflow.com/questions/55920957/cloudflare-worker-typeerror-one-time-use-body
redirect: "manual",
// @ts-ignore // @ts-ignore
duplex: "half", duplex: "half",
signal: controller.signal, signal: controller.signal,