To apply a Source Filter there are different options available. You can make a source filter through the funnel icon you see on the rules editor page
First you can select page URL on which you want to add source filter. There are 4 ways to add your page URL of the site on which you want to apply this filter. It let's you apply your rule to a particular website instead of all the websites you open in your browser. In the select drop-down you will see 4 options. below is described how you can use them.
Equals operator does strict matching of URL intercepted by the browser with the URL given in rule.
URL given in Rule: http://www.google.com
Intercepted URL: http://www.google.com/
Result: Does not match (Observe trailing slash)
Contains operator does a sub-string search of string provided in rule inside the URL intercepted by Chrome. Example 1:
String in Rule: yahoo
Intercepted URL: https://www.yahoo.com/
String in Rule: com?a=1
Intercepted URL: https://www.got.com?a=2 Result: Does Not Match
Regex Match Operator matches a given Regex with the URL intercepted by chrome. You can also use the values of group expressions in your destination URLs. It will be useful when on a particular site you want to target resources which the site is getting from another external site. So, here you can add that site and the rule will be applied on that site's requests.
Example 1: Suppose I want to block gstatic font on an example website, let's say photonkit.com here. Now what I will do I will make cancel request rule for photonkit.com but making rule without any filter will cancel the entire website from loading on our browser and I just want to cancel the gstatic font request when the site loads. So what I'll do is use RegEx in filter and add below expression in it. It'll cancel the gstatic font request.
Wildcard match operator matches expression with the URL intercepted by chrome. We only support asterisk (*) as a wildcard operator. *can match 0 or more characters in intercepted URL. Please note that in wildcard match, complete URL is matched with given expression and *’s can be replaced with respective values in destination URL.
Result: $1 = http, $2 = cricket
Result: Does not match. Note the trails does not match
Result: $1 = http://www. $2=.com
Result: Does not match (Observe the trailing slash in URL)
From it you can select the exact type of file on which you want to apply your rule. By default it is selected to all types but you can specify the type of file on which you want to apply this rule from the drop-down.
Example 1: If you want to block all the images which appear on a particular website, than you can do so by selecting Resource type as image.
Example 2: You want to block all the CSS file which load on a particular website than you can select CSS in Resource Type to do so. It will block all CSS file on that website.
From it you can modify a particular type on network request going from your desired website. By default it will apply on all type of network request but you can target a particular one from the drop-down.
Example 1: If you want to block a particular GET Request going from the entered site you can target it from here.