Update common.ts

This commit is contained in:
Richard C Lim 2025-02-03 02:29:24 -05:00 committed by GitHub
parent 2efbed4f61
commit 5d35dc9ce7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,13 +14,7 @@ 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
.get("Authorization")
?.trim()
.replaceAll("Bearer ", "")
.trim() ?? "";
authHeaderName = "Authorization"; authHeaderName = "Authorization";
} else { } else {
authValue = req.headers.get("Authorization") ?? ""; authValue = req.headers.get("Authorization") ?? "";