From 855cc6879dba3845431a57b3302dc93457c42772 Mon Sep 17 00:00:00 2001 From: DirkSchlossmacher <62424946+DirkSchlossmacher@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:44:28 +0100 Subject: [PATCH] (!apiKey || !!serverConfig.hideUserApiKey) { --- app/api/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/auth.ts b/app/api/auth.ts index 3df8d9e2f..7ddcda587 100644 --- a/app/api/auth.ts +++ b/app/api/auth.ts @@ -56,7 +56,7 @@ export function auth(req: NextRequest) { */ // if user does not provide an api key, inject system api key - if (!apiKey) { + if (!apiKey || !!serverConfig.hideUserApiKey) { const serverApiKey = serverConfig.isAzure ? serverConfig.azureApiKey : serverConfig.apiKey;