Skip to content

Commit

Permalink
Merge pull request #43 from adobe/contribution-day-changes
Browse files Browse the repository at this point in the history
PDCL-5086: filter out the user's access token in verbose mode
  • Loading branch information
brenthosie authored Apr 16, 2021
2 parents 84aa90b + 4c2dc47 commit 255e9d3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ const checkOldProductionEnvironmentVariables = require('./checkOldProductionEnvi
(async () => {
try {
if (argv.verbose) {
require('request-debug')(require('request-promise-native'));
require('request-debug')(require('request-promise-native'), function(type, data, r) {
const filteredData = { ...data };
if (filteredData.headers?.Authorization) {
filteredData.headers.Authorization = 'Bearer [USER_ACCESS_TOKEN]'
}
console.error({ [type]: filteredData })
return r;
});
}

const environment = getEnvironment(argv);
Expand Down

0 comments on commit 255e9d3

Please sign in to comment.