bithavoc / express-winston

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

Add an headerBlacklist option #217

Closed maxday closed 5 years ago

maxday commented 5 years ago

Hello !

The use case here is to prevent logging some sensitive content stored in headers (such as cookies or authorization bearer tokens)

I know this is already achievable using requestFilter option, but it seems to me that obfuscating headers is a common practice which should not require extra code in requestFilter.

What do you think ?

Content of this PR :

Thanks for reviewing this PR, let me know what do you think, I tried to ship production code ready but any comments is appreciated.

:)

maxday commented 5 years ago

Hi, @golopot @bithavoc Did you get a chance to review this PR ? Thanks !

bithavoc commented 5 years ago

@maxday Sorry I missed this. looks good, I see multiple commits though, want me to squash and merge or do you prefer to squash them yourself?

maxday commented 5 years ago

@bithavoc no worries, you can squash and merge from your side ! thanks

bithavoc commented 5 years ago

Released express-winston@3.3.0

Thank you @maxday

alokrajiv commented 4 years ago

Think the typescript def for this really useful LoggerOption was missed. @bithavoc I've added a PR #228. Would you be able to help release it, if it looks fine?

Thanks for the wonderful PR @maxday. ( and @bithavoc ofcourse- for the package itself!