mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-20 04:42:46 +08:00
feat: dynamic config
This commit is contained in:
@@ -32,7 +32,7 @@ export function middleware(req: NextRequest) {
|
||||
|
||||
// inject api key
|
||||
if (!token) {
|
||||
const apiKey = process.env.OPENAI_API_KEY;
|
||||
const apiKey = serverConfig.apiKey;
|
||||
if (apiKey) {
|
||||
console.log("[Auth] set system token");
|
||||
req.headers.set("token", apiKey);
|
||||
|
Reference in New Issue
Block a user