From: Justin Wind Date: Sun, 24 Mar 2024 21:29:59 +0000 (-0700) Subject: lint cleanup X-Git-Tag: v3.0.2~3 X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=1f557bcdd06dfdba6ce7485bd6307db3359dcb08;p=squeep-logger-json-console lint cleanup --- diff --git a/lib/json-replacers.js b/lib/json-replacers.js index 51eacb3..14ac334 100644 --- a/lib/json-replacers.js +++ b/lib/json-replacers.js @@ -62,9 +62,10 @@ function replacerHttpIncomingMessage(_key, value) { // This blurs entire auth string if no space found, because -1 from indexOf. const blurredAuthHeader = authHeader.slice(0, spaceIndex + 1) + '*'.repeat(authHeader.length - (spaceIndex + 1)); // New headers object, as we change it. - newValue.headers = Object.assign({}, newValue.headers, { + newValue.headers = { + ...newValue.headers, authorization: blurredAuthHeader, - }); + }; } value = newValue; }