Fix schema: allow empty optional interface/firewall values

Optional match()?/list()? validators reject empty string, which is the
default value, blocking add-on start. Use regexes that accept empty OR valid.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Savant Coder
2026-07-21 14:18:16 -04:00
parent 2803cf6792
commit 8c21a378ad

View File

@ -40,7 +40,7 @@ schema:
log_level: list(trace|debug|info|notice|warning|error|fatal)
host_name: str?
port: int(0,65535)?
interface: "match(^netmaker[a-zA-Z0-9_-]*$)?"
interface: "match(^(?:netmaker[a-zA-Z0-9_-]*)?$)?"
endpoint: str?
endpoint6: str?
firewall: list(iptables|nftables)?
firewall: "match(^(?:iptables|nftables)?$)?"