Skip to content

Commit

Permalink
ZKUI-381 // Fix objects dowload in 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hervedombya committed Oct 3, 2023
1 parent 92702f6 commit 5fc8476
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/js/S3Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,23 @@ export default class S3Client {
) {
const result = this.originalAddAuthorization(credentials, date);

request.endpoint = originalRequest.endpoint;
request.headers = {
...originalRequest.headers,
...request.headers,
Host: originalRequest.headers.Host,
};
request.path = originalRequest.path;
if (!this.isPresigned()) {
request.endpoint = originalRequest.endpoint;
request.headers = {
...originalRequest.headers,
...request.headers,
Host: originalRequest.headers.Host,
};
request.path = originalRequest.path;
} else {
request.endpoint = originalRequest.endpoint;
request.headers = {
...originalRequest.headers,
...request.headers,
Host: originalRequest.headers.Host,
};
request.path = s3Path + request.path;
}
return result;
};

Expand Down

0 comments on commit 5fc8476

Please sign in to comment.