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

This commit is contained in:
Xubin Ren authored and Xubin Ren committed 2026-04-04 19:43:18 +08:00
1 parent 5f08d61d8f
commit 9ef5b1e145
3 files changed
+49 -3

No files matched your search

+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: