Logger MaskSentive just for strings and array string items (#3571)

This commit is contained in:
Paulo Vítor S Reis
2017-02-26 15:34:03 -03:00
committed by Florent Vilmart
parent fe5947ce4c
commit 032d5e55ca

View File

@@ -41,7 +41,18 @@ export class LoggerController extends AdaptableController {
// check the url
if (e.url) {
e.url = this.maskSensitiveUrl(e.url);
// for strings
if (typeof e.url === 'string') {
e.url = this.maskSensitiveUrl(e.url);
} else if (Array.isArray(e.url)) { // for strings in array
e.url = e.url.map(item => {
if (typeof item === 'string') {
return this.maskSensitiveUrl(item);
}
return item;
});
}
}
if (e.body) {