mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-07 09:43:42 +08:00
修改: .env.template
修改: app/api/auth.ts 修改: app/api/bedrock.ts 修改: app/client/api.ts 修改: app/client/platforms/bedrock.ts 修改: app/components/settings.tsx 修改: app/config/server.ts 修改: app/constant.t
This commit is contained in:
@@ -54,18 +54,18 @@ export function auth(req: NextRequest, modelProvider: ModelProvider) {
|
||||
}
|
||||
// Special handling for Bedrock
|
||||
if (modelProvider === ModelProvider.Bedrock) {
|
||||
const region = req.headers.get("X-Region");
|
||||
const accessKeyId = req.headers.get("X-Access-Key");
|
||||
const secretKey = req.headers.get("X-Secret-Key");
|
||||
const region = serverConfig.awsRegion;
|
||||
const accessKeyId = serverConfig.awsAccessKey;
|
||||
const secretAccessKey = serverConfig.awsSecretKey;
|
||||
|
||||
console.log("[Auth] Bedrock credentials:", {
|
||||
region,
|
||||
accessKeyId: accessKeyId ? "***" : undefined,
|
||||
secretKey: secretKey ? "***" : undefined,
|
||||
secretKey: secretAccessKey ? "***" : undefined,
|
||||
});
|
||||
|
||||
// Check if AWS credentials are provided
|
||||
if (!region || !accessKeyId || !secretKey) {
|
||||
if (!region || !accessKeyId || !secretAccessKey) {
|
||||
return {
|
||||
error: true,
|
||||
msg: "Missing AWS credentials. Please configure Region, Access Key ID, and Secret Access Key in settings.",
|
||||
|
||||
Reference in New Issue
Block a user