Skip to content

Commit

Permalink
Update signature.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei-Kraven authored Dec 26, 2024
1 parent 06c4196 commit b4003a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/internal/signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,10 @@ export class SignatureV4 {
if (request.path) {
// Ensure there is a trailing slash at the end of the URL
// so that appending the path does not result in a malformed URL.
url = url?.endsWith('/') ? url : url + '/'

if (!url.endsWith('/') && !request.path.startsWith('/')) {
url += '/'
}

// Append the path to the URL
url += request.path
}
Expand Down

0 comments on commit b4003a9

Please sign in to comment.