Skip to content

Commit 032d5e5

Browse files
paulovitinflovilmart
authored andcommitted
Logger MaskSentive just for strings and array string items (#3571)
1 parent fe5947c commit 032d5e5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Controllers/LoggerController.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,18 @@ export class LoggerController extends AdaptableController {
4141

4242
// check the url
4343
if (e.url) {
44-
e.url = this.maskSensitiveUrl(e.url);
44+
// for strings
45+
if (typeof e.url === 'string') {
46+
e.url = this.maskSensitiveUrl(e.url);
47+
} else if (Array.isArray(e.url)) { // for strings in array
48+
e.url = e.url.map(item => {
49+
if (typeof item === 'string') {
50+
return this.maskSensitiveUrl(item);
51+
}
52+
53+
return item;
54+
});
55+
}
4556
}
4657

4758
if (e.body) {

0 commit comments

Comments
 (0)