do not send password to loggly (#8887)

This commit is contained in:
Matteo Pagliazzi 2017-07-20 15:07:38 +02:00 committed by GitHub
parent bf8b2db6b3
commit 95285cd85a

View file

@ -68,7 +68,7 @@ module.exports = function errorHandler (err, req, res, next) { // eslint-disable
logger.error(err, {
method: req.method,
originalUrl: req.originalUrl,
headers: omit(req.headers, ['x-api-key', 'cookie']), // don't send sensitive information that only adds noise
headers: omit(req.headers, ['x-api-key', 'cookie', 'password', 'confirmPassword']), // don't send sensitive information that only adds noise
body: req.body,
httpCode: responseErr.httpCode,
isHandledError: responseErr.httpCode < 500,