heapsource/express-winston — pull request #33 by nuarhu (2014-07-24 13:05:56+00:00)
Title: Blacklist

Hi there,

we have quite a lot of properties in our requests and it would have been impractical to maintain a whitelist. So, instead I've added blacklisting to your module. I've only been testing it with the global blacklist, so I'm not sure blacklisting in single routes works but the functionality is there.

I was a bit confused about the variable 'bodyWhitelist'. The exported one is never considered? When I simply copied the whitelist code to create the actual blacklist it didn't work. You might want to have a look. I am merging the module field 'bodyBlacklist' to the function scope variable 'blacklist'. Though, I might be missing some behind the scenes magic?

If you approve I can also update the README. So far, no documentation but, essentially, it works just like the whitelisting from a configuration point of view. Of course, the outcome is different. If a whitelist and a blacklist is defined, the whitelist will have precedence and the blacklist is ignored.

Some differences in the diff are only whitespacing as my editor deletes trailing whitespace. Fixed indentation in second commit.