Update dashboard.py

Fixed #490
This commit is contained in:
Donald Zou 2025-02-14 23:59:21 +08:00
parent 7c70fbec30
commit 5cd99f2edc

View File

@ -1807,6 +1807,7 @@ class DashboardConfig:
if section == "Peers" and key == "peer_endpoint_allowed_ip": if section == "Peers" and key == "peer_endpoint_allowed_ip":
value = value.split(",") value = value.split(",")
for i in value: for i in value:
i = i.strip()
try: try:
ipaddress.ip_network(i, strict=False) ipaddress.ip_network(i, strict=False)
except Exception as e: except Exception as e: