Interface URLPurifyConfig

interface URLPurifyConfig {
    hashFromMemory?: string;
    hashUrl?: string;
    instancePickMode?: InstancePickMode;
    onFetchedRedirectServices?: (newServices: SerializedServices) => void;
    onFetchedRules?: (newHash: string, newRules: SerializedRules) => void;
    redirectServicesFromMemory?: SerializedServices;
    redirectServicesUrl?: string;
    referralMarketing?: boolean;
    rulesFromMemory?: SerializedRules;
    ruleUrl?: string;
}

Properties

hashFromMemory?: string

sha256 hash of a previously fetched ruleset

hashUrl?: string

URL for sha256 hash of the up-to-date ruleset

instancePickMode?: InstancePickMode

Whether to select the first available instance or pick a random one

onFetchedRedirectServices?: (newServices: SerializedServices) => void

Callback function to be called when new redirect services URLs are fetched

onFetchedRules?: (newHash: string, newRules: SerializedRules) => void

Callback function to be called when new rules are fetched

redirectServicesFromMemory?: SerializedServices

Previously fetched redirect services URLs

redirectServicesUrl?: string

URL for up-to-date redirect services URLs

referralMarketing?: boolean

Remove referral marketing parameters from URLs

rulesFromMemory?: SerializedRules

Previously fetched URL cleaning rules

ruleUrl?: string

URL for up-to-date URL cleaning rules