Documentation
    Preparing search index...

    Function createFirewallState

    • Create a firewall state container backed by @kehto/firewall and optionally persisted via the given persistence hooks.

      When persistence is absent (or undefined), firewall config is in-memory only and resets on container recreation. This is safe for hosts that do not need durable per-napplet policies.

      Parameters

      Returns FirewallStateContainer

      A FirewallStateContainer instance.

      const firewall = createFirewallState(persistence);
      firewall.load();
      firewall.setPolicy('chat', 'allow');
      firewall.persist();