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.
napplets[napplet].policy
policy
Current firewall config
Napplet dTag to configure
Policy posture ('allow' | 'deny' | 'ask')
New FirewallConfig with the policy set
const cfg2 = setPolicy(cfg, 'chat', 'deny');// cfg2.napplets['chat'].policy === 'deny'// cfg is unchanged Copy
const cfg2 = setPolicy(cfg, 'chat', 'deny');// cfg2.napplets['chat'].policy === 'deny'// cfg is unchanged
Set the hard policy posture for a specific napplet (dTag).
Returns a new FirewallConfig with
napplets[napplet].policyset topolicy. If the napplet has no existing entry, a fresh entry is created. The original config is never modified.