fix: reset ssrf whitelist on config reload and document config refresh

This commit is contained in:
Xubin Ren
2026-04-04 19:43:18 +08:00
committed by Xubin Ren
parent 5f08d61d8f
commit 9ef5b1e145
3 changed files with 49 additions and 3 deletions
+2 -3
View File
@@ -54,10 +54,9 @@ def load_config(config_path: Path | None = None) -> Config:
def _apply_ssrf_whitelist(config: Config) -> None:
"""Apply SSRF whitelist from config to the network security module."""
if config.tools.ssrf_whitelist:
from nanobot.security.network import configure_ssrf_whitelist
from nanobot.security.network import configure_ssrf_whitelist
configure_ssrf_whitelist(config.tools.ssrf_whitelist)
configure_ssrf_whitelist(config.tools.ssrf_whitelist)
def save_config(config: Config, config_path: Path | None = None) -> None: