Optional
bodySpecifies whether and how to include the body of the request in the hash. The default value is true
.
Optional
customAny custom value (which can be JSON stringified) to be added in the content to be hashed.
Optional
formatSpecifies the output format. Default value is hex
.
Check Node.js API for more information: https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding|hash.digest(format).
Optional
headersSpecifies whether and how to include the headers in the hash.
The default value is false
.
Optional
hostnameSpecifies whether and how to include the hostname in the hash. The default value is false
.
Optional
methodSpecifies whether to include the method in the hash. The default value is false
.
Optional
pathnameSpecifies whether and how to include the pathname part of the url in the hash. The default value is false
.
Optional
portSpecifies whether to include the port in the hash. The default value is false
.
Optional
protocolSpecifies whether to include the protocol in the hash. The default value is false
.
Optional
querySpecifies whether and how to include the query part of the url in the hash. The default value is true
.
Optional
typeSpecifies the hash algorithm. Default value is sha256
.
Check Node.js API for more information: https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options|crypto.createHash(type).
Type of the argument expected by checksum. It specifies which data from the request to include in the checksum.
Remarks
To include or exclude data, not every kind of data from the request has the same complexity. For instance, the HTTP method is simple: use it or don't use it. But for things like query parameters, headers, body: you might want to select/filter.