Ver código fonte

fix: #2485 one-time-use body

Yidadaa 1 ano atrás
pai
commit
b14c5cd89c
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      app/api/common.ts

+ 2 - 0
app/api/common.ts

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