Update util.ts
This commit is contained in:
@@ -66,21 +66,15 @@ export const performAwsIamLogin = async (baseUrl: string, identityId: string, re
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
let host = (signOpts as any)["Host"];
|
delete signOpts.headers?.host;
|
||||||
if (signOpts as any["Host"]) {
|
|
||||||
host = `${(signOpts as any)["Host"].replace(".sts", `.sts.${region}.`)}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(signOpts);
|
|
||||||
console.log("host", host);
|
|
||||||
const headers = {
|
const headers = {
|
||||||
...signOpts.headers,
|
...signOpts.headers
|
||||||
host
|
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
iamHttpRequestMethod: "POST",
|
iamHttpRequestMethod: "POST",
|
||||||
iamRequestUrl: signOpts.host,
|
iamRequestUrl: signOpts.host,
|
||||||
iamRequestBody: body,
|
iamRequestBody: body,
|
||||||
iamRequestHeaders: signOpts.headers
|
iamRequestHeaders: headers
|
||||||
} as const;
|
} as const;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user