mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 11:36:38 +08:00
Fixing manual merge
This commit is contained in:
parent
7c3ac051ef
commit
20c81d0148
@ -46,7 +46,7 @@ export function auth(req: NextRequest, modelProvider: ModelProvider) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (serverConfig.hideUserApiKey && !!apiKey) {
|
if (serverConfig.hideUserApiKey && !!apiKey) {
|
||||||
return {
|
return {
|
||||||
error: true,
|
error: true,
|
||||||
@ -63,7 +63,7 @@ export function auth(req: NextRequest, modelProvider: ModelProvider) {
|
|||||||
|
|
||||||
if (serverApiKey) {
|
if (serverApiKey) {
|
||||||
console.log("[Auth] use system api key");
|
console.log("[Auth] use system api key");
|
||||||
req.headers.set("Authorization", `Bearer ${systemApiKey}`);
|
req.headers.set("Authorization", `Bearer ${serverApiKey}`);
|
||||||
} else {
|
} else {
|
||||||
console.log("[Auth] admin did not provide an api key");
|
console.log("[Auth] admin did not provide an api key");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user