From b580de32a3d7dd7d95d7aa8fa0bc32a2bd727157 Mon Sep 17 00:00:00 2001 From: "[witbox2018]" <103164430@qq.com> Date: Fri, 7 Apr 2023 16:36:11 +0800 Subject: [PATCH] 4 --- app/api/common.ts | 2 +- next.config.js | 1 + package-lock.json | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/api/common.ts b/app/api/common.ts index cef9493f8..842eeacaf 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -6,7 +6,7 @@ const PROTOCOL = process.env.PROTOCOL ?? DEFAULT_PROTOCOL; const BASE_URL = process.env.BASE_URL ?? OPENAI_URL; export async function requestOpenai(req: NextRequest) { - const apiKey = "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"; + const apiKey = req.headers.get("token"); const openaiPath = req.headers.get("path"); console.log("[Proxy] ", openaiPath); diff --git a/next.config.js b/next.config.js index fc164db9c..9776af759 100644 --- a/next.config.js +++ b/next.config.js @@ -4,6 +4,7 @@ const nextConfig = { experimental: { appDir: true, }, + disableExperimentalFeaturesWarning: true, webpack(config) { config.module.rules.push({ test: /\.svg$/, diff --git a/package-lock.json b/package-lock.json index 0be2a3eea..a8374d735 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "": { "name": "chatgpt-next-web", "version": "1.9.3", - "license": "Anti 996", + "license": "Apache-2.0", "dependencies": { "@hello-pangea/dnd": "^16.2.0", "@svgr/webpack": "^6.5.1", diff --git a/package.json b/package.json index 2125981e5..a660da18f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "chatgpt-next-web", "version": "1.9.3", "private": false, - "license": "Anti 996", + "license": "Apache-2.0", "scripts": { "dev": "yarn fetch && next dev", "build": "yarn fetch && next build",