Update util.ts

This commit is contained in:
Daniel Hougaard
2024-09-23 23:45:23 +04:00
parent 26764bfd80
commit 86a941249e

View File

@@ -66,8 +66,17 @@ export const performAwsIamLogin = async (baseUrl: string, identityId: string, re
} }
); );
console.log(signOpts); let host = signOpts.host;
if (signOpts.host) {
host = `${signOpts.host.replace(".sts", `.sts.${region}.`)}`;
}
console.log(signOpts);
console.log("host", host);
const headers = {
...signOpts.headers,
host
};
return { return {
iamHttpRequestMethod: "POST", iamHttpRequestMethod: "POST",
iamRequestUrl: signOpts.host, iamRequestUrl: signOpts.host,