I have a restify api set up with the audit logger plugin, I have the option to also log the body set to true, but I want to be able to either filter or remove parameters sent on the body and header, like password or token which are currently being saved on restify's logs.
Example of current log:
req: {
"headers": {
"authorization": "Token token=**youshouldnotseeme**,provider=**hellno**",
"date": "Wed, 09 Oct 2013 17:10:53 GMT",
"host": "localhost:8082",
"connection": "keep-alive"
}
"body": {
"username": "somedude",
"password": "**youshouldnotseeme**"
}
}
Example of what I would like:
req: {
"headers": {
"authorization": "Token token=**[FILTERED]**,provider=**[FILTERED]**",
"date": "Wed, 09 Oct 2013 17:10:53 GMT",
"host": "localhost:8082",
"connection": "keep-alive"
}
"body": {
"username": "somedude",
"password": "**[FILTERED]**"
}
}
So how would I be able to achieve this?
Thank you.