mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-13 04:33:42 +08:00
fix: #198
This commit is contained in:
@@ -225,7 +225,8 @@ export class AgentApi {
|
||||
const serverConfig = getServerSideConfig();
|
||||
|
||||
// const reqBody: RequestBody = await req.json();
|
||||
const isAzure = reqBody.isAzure || serverConfig.isAzure;
|
||||
// ui set azure model provider
|
||||
const isAzure = reqBody.isAzure;
|
||||
const authHeaderName = isAzure ? "api-key" : "Authorization";
|
||||
const authToken = req.headers.get(authHeaderName) ?? "";
|
||||
const token = authToken.trim().replaceAll("Bearer ", "").trim();
|
||||
|
||||
Reference in New Issue
Block a user