Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
nleush committed Aug 12, 2024
1 parent bd860d2 commit c6bd42a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/whitelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@
var disableWildcard = options && options.disableWildcard;
var allowTag = options && options.allowTag;

console.log('--- allowTag', allowTag);

var patterns = extractDomainPatterns(uri, disableWildcard);

var record, i = 0;
Expand All @@ -133,13 +135,16 @@
record = whitelistObject.domains[pattern];
// Filter by tag.
if (record && record.tags?.length) {
console.log('---- record.tags', record)
if (allowTag) {
if (record.tags.indexOf(allowTag) === -1) {
// Disable record if not tag match.
console.log('-disable record 1')
record = null;
}
} else {
// Disable record with tags.
console.log('-disable record 2')
record = null;
}
}
Expand Down

0 comments on commit c6bd42a

Please sign in to comment.