mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
remove sensitive info from logs
This commit is contained in:
@@ -69,8 +69,11 @@ 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', 'password', 'confirmPassword']), // don't send sensitive information that only adds noise
|
||||
body: req.body,
|
||||
|
||||
// don't send sensitive information that only adds noise
|
||||
headers: omit(req.headers, ['x-api-key', 'cookie', 'password', 'confirmPassword']),
|
||||
body: omit(req.body, ['password', 'confirmPassword']),
|
||||
|
||||
httpCode: responseErr.httpCode,
|
||||
isHandledError: responseErr.httpCode < 500,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user