Share this page

# Utils.addAutoFilter

Adds a filter to one of the lists that either blocks certain URLs (denylist), or allows only specific URLs (allowlist).

The URL of each HTTP request is checked first against the denylist, and then the allowlist. HTTP requests that do not pass the check are blocked.

    Utils.addAutoFilter(url, isIncluded);

## Arguments

Name | Description
--- | ---
url | (string or regexp) String or regular expression that represents the URL.
isIncluded | (boolean) Set to true to add the URL to the allowlist, or false to add the URL to the denylist.

## Return value

A promise that will be fulfilled with no arguments.

## Examples

The specified domain is added to the allowlist. All other domains are blocked.

Copy code

    (async ()=>{
        await Utils.addAutoFilter("https://www.myco.com/*", true);
    })();

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: