From f22cf1af43bc727bb7719149638cebd47221c9da Mon Sep 17 00:00:00 2001 From: "ZOO\\emichi" Date: Sat, 13 May 2023 23:56:21 +0300 Subject: [PATCH] feat: amend-readme-example - fix readme example --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1f6fca7..e550256 100644 --- a/README.md +++ b/README.md @@ -178,19 +178,19 @@ levels: { ```js app.use(audit({ logger: logger, // Existing bunyan logger - excludeURLs: [‘health’, ‘metrics’], // Exclude paths which enclude 'health' & 'metrics' + excludeURLs: ['health', 'metrics'], // Exclude paths which enclude 'health' & 'metrics' request: { - maskBody: [‘password’], // Mask 'password' field in incoming requests - excludeHeaders: [‘authorization’], // Exclude 'authorization' header from requests - excludeBody: [‘creditCard’], // Exclude 'creditCard' field from requests body - maskHeaders: [‘header1’], // Mask 'header1' header in incoming requests + maskBody: ['password'], // Mask 'password' field in incoming requests + excludeHeaders: ['authorization'], // Exclude 'authorization' header from requests + excludeBody: ['creditCard'], // Exclude 'creditCard' field from requests body + maskHeaders: ['header1'], // Mask 'header1' header in incoming requests maxBodyLength: 50 // limit length to 50 chars + '...' }, response: { - maskBody: [‘session_token’] // Mask 'session_token' field in response body - excludeHeaders: [‘*’], // Exclude all headers from responses, - excludeBody: [‘*’], // Exclude all body from responses - maskHeaders: [‘header1’], // Mask 'header1' header in incoming requests + maskBody: ['session_token'], // Mask 'session_token' field in response body + excludeHeaders: ['*'], // Exclude all headers from responses, + excludeBody: ['*'], // Exclude all body from responses + maskHeaders: ['header1'], // Mask 'header1' header in incoming requests maxBodyLength: 50 // limit length to 50 chars + '...' }, shouldSkipAuditFunc: function(req, res){