mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 06:16:27 +08:00
fix: 1. anthropic client using common getHeaders; 2. always using Authorization
header send access code
This commit is contained in:
@@ -184,7 +184,8 @@ export function getHeaders() {
|
||||
accessStore.enabledAccessControl() &&
|
||||
validString(accessStore.accessCode)
|
||||
) {
|
||||
headers[authHeader] = makeBearer(
|
||||
// access_code must send with header named `Authorization`, will using in auth middleware.
|
||||
headers['Authorization'] = makeBearer(
|
||||
ACCESS_CODE_PREFIX + accessStore.accessCode,
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user