-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
How to use the library for the following example?
||ads.example.com^$domain=example.com|~foo.example.com
(taken from adblockplus.org filters explained)
The page that is loaded is http://example.com or http://subdomain.example.com.
The banner url is, for example, http://ads.example.com/foo.gif.
I try to do something like this (abridged):
Uri url;
Uri.TryCreate(request.Url, UriKind.Absolute, out url); // http://ads.example.com/foo.gif
var filters = allFilters.GetFiltersForDomain(pageUrl.Host); // example.com
foreach (var filter in filters)
{
if (filter.IsMatch(url, headers))
return true; // match
}
return false; // no match
But it seems that this isn't how it's intended to be. Am I wrong?
Metadata
Metadata
Assignees
Labels
No labels