mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 13:46:37 +08:00
Update common.ts
This commit is contained in:
parent
5d35dc9ce7
commit
07b34eb44d
@ -14,7 +14,11 @@ const isAzure = req.nextUrl.pathname.includes("azure/deployments") || Boolean(se
|
||||
var authValue,
|
||||
authHeaderName = "";
|
||||
if (isAzure) {
|
||||
authValue = `Bearer ${serverConfig.azureApiKey}`;
|
||||
authValue = `Bearer ${req.headers
|
||||
.get("Authorization")
|
||||
?.trim()
|
||||
.replaceAll("Bearer ", "")
|
||||
.trim() ?? ""}`;
|
||||
authHeaderName = "Authorization";
|
||||
} else {
|
||||
authValue = req.headers.get("Authorization") ?? "";
|
||||
|
Loading…
Reference in New Issue
Block a user