mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-23 06:00:17 +09:00
Enhance encryption security with additional safeguards.
This commit is contained in:
parent
7830b37a90
commit
4b2f447474
@ -32,14 +32,10 @@ async function getBedrockCredentials(
|
||||
const [encryptedRegion, encryptedAccessKey, encryptedSecretKey] =
|
||||
credentials.split(":");
|
||||
|
||||
// console.log("===========encryptedRegion",encryptedRegion);
|
||||
// console.log("===========encryptedAccessKey",encryptedAccessKey);
|
||||
// console.log("===========encryptedSecretKey",encryptedSecretKey);
|
||||
if (!encryptedRegion || !encryptedAccessKey || !encryptedSecretKey) {
|
||||
throw new Error("Invalid Authorization header format");
|
||||
}
|
||||
const encryptionKey = req.headers.get("XEncryptionKey") || "";
|
||||
// console.log("===========encryptionKey",encryptionKey);
|
||||
// Decrypt the credentials
|
||||
[awsRegion, awsAccessKey, awsSecretKey] = await Promise.all([
|
||||
decrypt(encryptedRegion, encryptionKey),
|
||||
|
Loading…
Reference in New Issue
Block a user