From 8887f065b9228d38b242876ad3e2131d2b292cfe Mon Sep 17 00:00:00 2001 From: ssb-jnk Date: Thu, 16 May 2024 09:28:28 +0200 Subject: [PATCH] log headers but remove authorization because it would log the token --- server.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server.js b/server.js index a35a9bc..bb99ee9 100644 --- a/server.js +++ b/server.js @@ -18,9 +18,16 @@ app.use( '/api', proxy(DAPLA_TEAM_API_URL, { proxyReqBodyDecorator: function (bodyContent, srcReq) { + console.log(`Request Body: ${bodyContent}`) return bodyContent }, proxyReqOptDecorator: function (proxyReqOpts, srcReq) { + const headers = srcReq.headers + delete headers['authorization'] + console.log(`Request Headers:`, headers) + if (srcReq.body) { + console.log(`Request Body:`, srcReq.body) + } return proxyReqOpts }, proxyReqPathResolver: function (req) {