fix(luci-mitmproxy): Preserve autoban enabled state on save

Add rmempty=false to autoban enabled flag to prevent LuCI from
removing the option when saving the form. This fixes the issue
where saving settings would reset autoban to disabled.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-02-14 05:56:01 +01:00
parent cac9fa3e4f
commit 1fcddb6de3

View File

@ -174,6 +174,7 @@ return view.extend({
o = s.option(form.Flag, 'enabled', _('Enable Auto-ban'));
o.description = _('Automatically ban IPs that match threat patterns');
o.default = '1';
o.rmempty = false;
o = s.option(form.ListValue, 'sensitivity', _('Sensitivity Level'));
o.description = _('Controls how quickly IPs are banned. Strict: immediate ban on first threat. Moderate: ban after 3 threats in 5 minutes. Permissive: ban after 5 threats in 1 hour.');