This page describes possible parameter configurations. Pass any desired configuration to the init function.
Default: 1000
Time in milliseconds between cache flushes. Smaller intervals are advised for larger traffic volumes. Represented as an integer.
Example:
Supergood.init({ config: { flushInterval: 1000 }})Default: []
An array of keys in the string path dot format like path.to.key that will take the SHA1 hash of the actual value instead of the returned value. This masks sensitive information that can not live outside of your server.
Keys to hash must start with request or response and the second key must be body or headers. After that, the path can be arbitrarily long.
Example:
request.body.authorization_token will hash the value stored at the key authorization_token located on the body of the request.
Supergood.init({ config: keysToHash: ['request.body.authorization_token'] }})Default: []
An array of domains to ignore when caching traffic. Will match on partial domains and takes precedence over domains specified in ignoredDomains.
Example:
Supergood.init({ config: { allowedDomains: ['amazon.com', 'google'] }})Default: []
An array of domains to ignore when caching traffic.
In the format of:<domain-name>.<top-level-domain>
Example:
Supergood.init({ config: { ignoredDomains: ['amazon.com', 'google.com'] }})