@aws-sdk/signature-v4
Advanced tools
Comparing version
@@ -13,4 +13,21 @@ "use strict"; | ||
} | ||
return request; | ||
let path = request.path; | ||
const url = request === null || request === void 0 ? void 0 : request.destination; | ||
if (url != null) { | ||
let decodedPathname; | ||
try { | ||
decodedPathname = decodeURIComponent(url.pathname); | ||
} | ||
catch (e) { | ||
decodedPathname = url.pathname; | ||
} | ||
if (new URL(decodedPathname, url.origin).pathname !== decodedPathname) { | ||
path = decodedPathname; | ||
} | ||
} | ||
return { | ||
...request, | ||
path, | ||
}; | ||
}; | ||
exports.prepareRequest = prepareRequest; |
@@ -10,3 +10,20 @@ import { cloneRequest } from "./cloneRequest"; | ||
} | ||
return request; | ||
let path = request.path; | ||
const url = request?.destination; | ||
if (url != null) { | ||
let decodedPathname; | ||
try { | ||
decodedPathname = decodeURIComponent(url.pathname); | ||
} | ||
catch (e) { | ||
decodedPathname = url.pathname; | ||
} | ||
if (new URL(decodedPathname, url.origin).pathname !== decodedPathname) { | ||
path = decodedPathname; | ||
} | ||
} | ||
return { | ||
...request, | ||
path, | ||
}; | ||
}; |
{ | ||
"name": "@aws-sdk/signature-v4", | ||
"version": "3.289.0", | ||
"version": "3.290.0", | ||
"description": "A standalone implementation of the AWS Signature V4 request signing algorithm", | ||
@@ -25,5 +25,5 @@ "main": "./dist-cjs/index.js", | ||
"@aws-sdk/is-array-buffer": "3.201.0", | ||
"@aws-sdk/types": "3.289.0", | ||
"@aws-sdk/types": "3.290.0", | ||
"@aws-sdk/util-hex-encoding": "3.201.0", | ||
"@aws-sdk/util-middleware": "3.289.0", | ||
"@aws-sdk/util-middleware": "3.290.0", | ||
"@aws-sdk/util-uri-escape": "3.201.0", | ||
@@ -35,3 +35,3 @@ "@aws-sdk/util-utf8": "3.254.0", | ||
"@aws-crypto/sha256-js": "3.0.0", | ||
"@aws-sdk/protocol-http": "3.289.0", | ||
"@aws-sdk/protocol-http": "3.290.0", | ||
"@aws-sdk/util-buffer-from": "3.208.0", | ||
@@ -38,0 +38,0 @@ "@tsconfig/recommended": "1.0.1", |
102770
0.93%2094
1.65%+ Added
+ Added
- Removed
- Removed
Updated