mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 17:44:57 +08:00
fix: fix add api auth
This commit is contained in:
@@ -43,9 +43,8 @@ async function handle(
|
||||
10 * 60 * 1000,
|
||||
);
|
||||
|
||||
const fetchUrl = `${baseUrl}/${path}?key=${req.nextUrl.searchParams.get(
|
||||
"key",
|
||||
)}`;
|
||||
const key = req.nextUrl.searchParams.get("key") ?? serverConfig.googleApiKey;
|
||||
const fetchUrl = `${baseUrl}/${path}?key=${key}`;
|
||||
|
||||
const fetchOptions: RequestInit = {
|
||||
headers: {
|
||||
|
Reference in New Issue
Block a user