Browse Source

Merge pull request #2355 from fyl080801/main

fix: cloudflare headers
Yifei Zhang 1 year ago
parent
commit
22cf78d506
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/api/common.ts

+ 1 - 1
app/api/common.ts

@@ -35,12 +35,12 @@ export async function requestOpenai(req: NextRequest) {
   const fetchOptions: RequestInit = {
     headers: {
       "Content-Type": "application/json",
+      "Cache-Control": "no-store",
       Authorization: authValue,
       ...(process.env.OPENAI_ORG_ID && {
         "OpenAI-Organization": process.env.OPENAI_ORG_ID,
       }),
     },
-    cache: "no-store",
     method: req.method,
     body: req.body,
     // @ts-ignore