Skip to content

Commit

Permalink
fix(errHandler): make token obfuscation more obvious
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaledgarbaya authored May 29, 2017
1 parent 763eeff commit 18a8118
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/error-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export default function errorHandler (errorResponse) {

// Obscure the Management token
if (config.headers && config.headers['Authorization']) {
config.headers['Authorization'] = 'Bearer ACCESS_TOKEN'
const token = `...${config.headers['Authorization'].substr(-5)}`
config.headers['Authorization'] = `Bearer ${token}`
}
if (isObject(config)) {
errorData.request = {
Expand Down

0 comments on commit 18a8118

Please sign in to comment.