test-action-debian-package/node_modules/fast-redact/example/default-usage.js
Dawid Dziurla 9308795b8b
update
2020-03-26 15:37:35 +01:00

15 lines
353 B
JavaScript

'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))