Skip to content

Commit

Permalink
fix: Make sure X-Broker-Token header is not logged
Browse files Browse the repository at this point in the history
Make sure log entries' headers don't include x-broker-token token. The
log context already includes maskedToken which can be used to select
specific client's logs.
  • Loading branch information
hisenb3rg committed Jul 2, 2021
1 parent 4a17388 commit 0a7123a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ function sanitiseHeaders(headers) {
if (hdrs.authorization) {
hdrs.authorization = '${AUTHORIZATION}';
}
if (hdrs['X-Broker-Token']) {
hdrs['X-Broker-Token'] = '${BROKER_TOKEN}';
};
return sanitiseObject(hdrs);
}

Expand Down

0 comments on commit 0a7123a

Please sign in to comment.