bithavoc / express-winston

express.js middleware for winstonjs
https://www.npmjs.com/package/express-winston
MIT License
795 stars 187 forks source link

Allow dynamic meta to access blacklisted headers before they are removed from the payload #277

Open musojames opened 1 year ago

musojames commented 1 year ago

Allow a caller to access information from a value before it is removed by the logger blacklist.

The use case is decoding a JWT, and getting the content from it. But not wanting to log the token itself. The auth token is blacklisted to stop it being written out to the log, but the user id and roles are pulled from it first.

No new code, just changing the order or the code execution.