Security & Sanitization
Sanitization runs automatically before each entry is written to the store. Custom lists are merged with the built-in defaults, so you never lose the baseline protection.
Header redaction
The following request and response headers are replaced with [REDACTED] by default:
authorization, cookie, x-api-key, api-key, x-auth-token, bearer, token, password, secret, x-secret, x-token
Body field removal
The following fields are deleted from JSON request/response bodies:
password, token, secret, apiKey, api_key, accessToken, access_token, refreshToken, refresh_token, authorization, creditCard, credit_card, cvv, ssn, socialSecurity
Field masking (PII)
The following fields are partially masked rather than removed:
email, phone, phoneNumber, phone_number, address, firstName, first_name, lastName, last_name
Examples:
user@example.com→us***@example.com1234567890→12***890John→Jo***n
Customising sanitization
app.use(NetworkDashboard, {
sanitization: {
sensitiveHeaders: ['x-custom-token'], // added on top of defaults
sensitiveFields: ['pin', 'securityAnswer'], // added on top of defaults
maskFields: ['nationalId'], // added on top of defaults
},
})