From 1f557bcdd06dfdba6ce7485bd6307db3359dcb08 Mon Sep 17 00:00:00 2001 From: Justin Wind Date: Sun, 24 Mar 2024 14:29:59 -0700 Subject: [PATCH] lint cleanup --- lib/json-replacers.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.43.2