Skip to content

Commit

Permalink
Merge branch 'main' into cloud-apm-deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
heitortsergent committed Sep 29, 2023
2 parents 264d842 + 461bd4e commit 2192bbf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 39 deletions.
22 changes: 11 additions & 11 deletions src/data/markdown/docs/20 jslib/01 jslib/01 aws/00 SignatureV4.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ export default function () {
secretAccessKey: awsConfig.secretAccessKey,
sessionToken: awsConfig.sessionToken,
},

/**
* Whether the URI should be escaped or not.
*/
uriEscapePath: false,

/**
* Whether or not the body's hash should be calculated and included
* in the request.
*/
applyChecksum: false,
})

/**
Expand Down Expand Up @@ -105,17 +116,6 @@ export default function () {
* The headers we will be sending in the request.
*/
headers: {},

/**
* Whether the URI should be escaped or not.
*/
uriEscapePath: false,

/**
* Whether or not the body's hash should be calculated and included
* in the request.
*/
applyChecksum: false,
},

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ The first parameter of the `presign` method consists of an Object with the follo
| hostname | string | The hostname the request is sent to |
| path | string | The path of the request |
| headers | Object | The headers of the HTTP request |
| uriEscapePath | boolean | Whether to uri-escape the request URI path as part of computing the canonical request string. This is required for every AWS service, except Amazon S3, as of late 2017. |
| applyChecksum | boolean | Whether to calculate a checksum of the request body and include it as either a request header (when signing) or as a query string parameter (when pre-signing). This is required for AWS Glacier and Amazon S3 and optional for every other AWS service as of late 2017. |
| | | |

You can provide further options and override SignatureV4 options in the context of this specific request.
To do this, pass a second parameter to the `presign` method, which is an Object with the following parameters.
Expand Down Expand Up @@ -75,6 +72,8 @@ export default function () {
secretAccessKey: awsConfig.secretAccessKey,
sessionToken: awsConfig.sessionToken,
},
uriEscapePath: false,
applyChecksum: false,
})

// We can now use the signer to produce a pre-signed URL.
Expand Down Expand Up @@ -112,17 +111,6 @@ export default function () {
* hash calculation, and communicate that value instead, as specified.
*/
headers: { [AMZ_CONTENT_SHA256_HEADER]: 'UNSIGNED-PAYLOAD' },

/**
* Whether the URI should be escaped or not.
*/
uriEscapePath: false,

/**
* Whether or not the body's hash should be calculated and included
* in the request.
*/
applyChecksum: false,
},

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ The first parameter of the `sign` method consists of an Object with the followin
| hostname | string | The hostname the request is sent to |
| path | string | The path of the request |
| headers | Object | The headers of the HTTP request |
| uriEscapePath | boolean | Whether to uri-escape the request URI path as part of computing the canonical request string. This is required for every AWS service, except Amazon S3, as of late 2017. |
| applyChecksum | boolean | Whether to calculate a checksum of the request body and include it as either a request header (when signing) or as a query string parameter (when pre-signing). This is required for AWS Glacier and Amazon S3 and optional for every other AWS service as of late 2017. |
| body (optional) | string or ArrayBuffer | The optional body of the HTTP request |
| query (optional) | `Object.<string, string \| Array.<string>>` | The optional query parameters of the HTTP request |

Expand Down Expand Up @@ -69,6 +67,8 @@ export default function () {
secretAccessKey: awsConfig.secretAccessKey,
sessionToken: awsConfig.sessionToken,
},
uriEscapePath: false,
applyChecksum: false,
})

/**
Expand Down Expand Up @@ -106,17 +106,6 @@ export default function () {
* The headers we will be sending in the request.
*/
headers: {},

/**
* Whether the URI should be escaped or not.
*/
uriEscapePath: false,

/**
* Whether or not the body's hash should be calculated and included
* in the request.
*/
applyChecksum: false,
},

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For each subsequent request to that hostname, it includes the stored cookie data

You can then control more specific rules for whether to send the cookie data or not,
including limiting it to specific subdomains or paths.
You can also to set an expiry date on the cookie and tell the browser to send it only over encrypted (SSL/TLS) connections.
You can also set an expiry date on the cookie and tell the browser to send it only over encrypted (SSL/TLS) connections.

## Cookies with k6

Expand Down

0 comments on commit 2192bbf

Please sign in to comment.