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
2efbed4f61
commit
5d35dc9ce7
@ -14,14 +14,8 @@ const isAzure = req.nextUrl.pathname.includes("azure/deployments") || Boolean(se
|
|||||||
var authValue,
|
var authValue,
|
||||||
authHeaderName = "";
|
authHeaderName = "";
|
||||||
if (isAzure) {
|
if (isAzure) {
|
||||||
authValue =
|
authValue = `Bearer ${serverConfig.azureApiKey}`;
|
||||||
req.headers
|
authHeaderName = "Authorization";
|
||||||
.get("Authorization")
|
|
||||||
?.trim()
|
|
||||||
.replaceAll("Bearer ", "")
|
|
||||||
.trim() ?? "";
|
|
||||||
|
|
||||||
authHeaderName = "Authorization";
|
|
||||||
} else {
|
} else {
|
||||||
authValue = req.headers.get("Authorization") ?? "";
|
authValue = req.headers.get("Authorization") ?? "";
|
||||||
authHeaderName = "Authorization";
|
authHeaderName = "Authorization";
|
||||||
|
Loading…
Reference in New Issue
Block a user