update openslaw-secret.ts
This commit is contained in:
@@ -52,7 +52,9 @@ interface GetSecretResponse {
|
||||
};
|
||||
}
|
||||
|
||||
async function getSecretValueViaHttps(key: string): Promise<string> {
|
||||
async function getSecretValueViaAlibabaCloudHttps(
|
||||
key: string,
|
||||
): Promise<string> {
|
||||
const pkcs7Response = await fetchDataWithTimeout(
|
||||
"http://100.100.100.200/latest/dynamic/instance-identity/pkcs7",
|
||||
);
|
||||
@@ -100,7 +102,7 @@ async function getSecretValue(
|
||||
key: string,
|
||||
): Promise<string> {
|
||||
if (isOnAlibabaCloud) {
|
||||
return await getSecretValueViaHttps(key);
|
||||
return await getSecretValueViaAlibabaCloudHttps(key);
|
||||
} else {
|
||||
return await getSecretValueViaHatterCli(key);
|
||||
}
|
||||
@@ -143,9 +145,7 @@ for (const id of openClawInput.ids) {
|
||||
try {
|
||||
values[id] = await getSecretValue(isOnAlibabaCloud, id);
|
||||
} catch (e) {
|
||||
errors[id] = {
|
||||
message: e.message,
|
||||
};
|
||||
errors[id] = { message: e.message };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user