Documentation
    Preparing search index...

    Function setPolicy

    • Set the hard policy posture for a specific napplet (dTag).

      Returns a new FirewallConfig with napplets[napplet].policy set to policy. If the napplet has no existing entry, a fresh entry is created. The original config is never modified.

      Parameters

      • config: FirewallConfig

        Current firewall config

      • napplet: string

        Napplet dTag to configure

      • policy: NappletPolicy

        Policy posture ('allow' | 'deny' | 'ask')

      Returns FirewallConfig

      New FirewallConfig with the policy set

      const cfg2 = setPolicy(cfg, 'chat', 'deny');
      // cfg2.napplets['chat'].policy === 'deny'
      // cfg is unchanged