Categories

Developer

Henry Lu

Request RegEx Filter v1.1resigned1

  • rating
  • rating
  • rating
  • rating
  • rating
5.00 (4 reviews)
This Add-on will filter all HTTP requests (including requests for javascript files, images etc) based on the list of regular expressions the user provides. The addon works off of a Deny-list configured via the Options/Settings page for the Addon Request RegEx Filter

To configure this Add-on, Open the Add-ons/Extensions page of your browser or type "about:addons" in the address bar in Firefox.

Click on "Options" for the Request RegEx Filter add-on.

Then you can add or remove from the list of Regular Expressions that will denylist the http request.

For more details on how to write a regular expression, here are some resources:

  • Regular Expression 101
  • Mozilla Developer Documentation - Regular Expression

For Example:
Add the following regular expression to the denylist
  • http(s)?:\/\/ads[.]
and it will block all requests to websites that start with "ads." on http or https. this means any requests to get javascript or other content from http://ads.example.com
would be blocked.

This regex is purely for demonstration purposes. The above Regular Expression has the limitation that any website starting with "ads." would be blocked. So if you legitimately want to be visiting a site with a domain name prefixed with "ads." you would avoid using this regex.