Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracker allowlist wildcard tests #124

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,23 @@
"site": "https://testsite.com",
"request": "http://a.b.c.videos.allowlist-tracker-2.com/a.js",
"isAllowlisted": true
},
{
"description": "* alone does not match wildcard",
"site": "https://testsite.com",
"request": "https://allowlist-tracker-2.com/anything/wildcard.js",
"isAllowlisted": false
},
{
"description": "* works as a regex operator",
"site": "https://testsite.com",
"request": "https://allowlist-tracker-2.com/////wildcard.js",
"isAllowlisted": true
},
{
"description": "Regex .* is treated as a wildcard",
"site": "https://testsite.com",
"request": "https://allowlist-tracker-2.com/anything/wildcard2.js",
"isAllowlisted": true
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
"rule": "allowlist-tracker-2.com/login.js",
"domains": ["<all>"],
"reason": "match single resource on all sites"
},
{
"rule": "allowlist-tracker-2.com/*/wildcard.js",
"domains": ["<all>"],
"reason": "wildcard rule"
},
{
"rule": "allowlist-tracker-2.com/.*/wildcard2.js",
"domains": ["<all>"],
"reason": "wildcard rule with regex syntax"
}
]
},
Expand Down
Loading