Skip to content

Commit

Permalink
log proxy response headers
Browse files Browse the repository at this point in the history
  • Loading branch information
cgawron committed Mar 13, 2024
1 parent 6693181 commit 271593d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ app.use(`${PREFIX}*`, proxy(API_URL, {
console.log('headers', proxyReqOpts.headers);
console.log('body', srcReq.body);
return proxyReqOpts;
},
userResDecorator: function (proxyRes, proxyResData, userReq, userRes) {
console.log('proxyRes:', proxyRes.headers);
return proxyResData;
}
}));

Expand Down

0 comments on commit 271593d

Please sign in to comment.