update
This commit is contained in:
parent
d9becc67b6
commit
9308795b8b
964 changed files with 104265 additions and 16 deletions
14
node_modules/fast-redact/example/default-usage.js
generated
vendored
Normal file
14
node_modules/fast-redact/example/default-usage.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
'use strict'
|
||||
const fastRedact = require('..')
|
||||
const fauxRequest = {
|
||||
headers: {
|
||||
host: 'http://example.com',
|
||||
cookie: `oh oh we don't want this exposed in logs in etc.`,
|
||||
referer: `if we're cool maybe we'll even redact this`
|
||||
}
|
||||
}
|
||||
const redact = fastRedact({
|
||||
paths: ['headers.cookie', 'headers.referer']
|
||||
})
|
||||
|
||||
console.log(redact(fauxRequest))
|
||||
Loading…
Add table
Add a link
Reference in a new issue