Documentation
    Preparing search index...

    Function addMatcher

    • Append a content matcher to the firewall config.

      Matchers are evaluated in order; the first match wins (POLICY-03). Returns a new FirewallConfig with matcher appended to the end of config.matchers. The original config is never modified.

      Parameters

      Returns FirewallConfig

      New FirewallConfig with the matcher appended

      const cfg2 = addMatcher(cfg, { id: 'delete-spam', opClass: 'relay:write', kinds: [5], action: 'block' });
      // cfg2.matchers.length === cfg.matchers.length + 1