Skip to content

Commit

Permalink
Merge pull request #32 from JeffersonCurveBeam/session-token-fix
Browse files Browse the repository at this point in the history
add x-amz-security-token header
  • Loading branch information
IbrahimCSAE authored Jan 17, 2024
2 parents 565d0b1 + 58cb49a commit 0851a07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/createDicomWebTreeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ const initializeHealthlakeFetch = (healthlake) => {
signer.sign().then(({headers}) => {
xhr.setRequestHeader('x-amz-date', headers.get('x-amz-date'));
xhr.setRequestHeader('Authorization', headers.get('Authorization'));
// 'x-amz-security-token' request header is only required if temporary credentials used. Otherwise will cause authentication error.
headers.get('x-amz-security-token') && xhr.setRequestHeader('x-amz-security-token', headers.get('x-amz-security-token'));
xhr.wasSend(body);
});
} else {
Expand Down

0 comments on commit 0851a07

Please sign in to comment.