Merge pull request #5545 from ConnectAI-E/hotfix/google-auth-header

fix: build error
This commit is contained in:
Dogtiti 2024-09-27 11:43:43 +08:00 committed by GitHub
commit 870ad913cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ async function request(req: NextRequest, apiKey: string) {
"Cache-Control": "no-store",
"x-google-api-key":
req.headers.get("x-google-api-key") ||
(req.headers.get("Authorization") ?? "").replace("Bearer "),
(req.headers.get("Authorization") ?? "").replace("Bearer ", ""),
},
method: req.method,
body: req.body,