feat: 优化设置布局并支持管理端地址切换 (#130)

This commit is contained in:
chengma
2026-08-11 09:24:04 +08:00
parent 4ede126f58
commit cd2889d76c
9 changed files with 347 additions and 47 deletions
+9
View File
@@ -40,6 +40,15 @@ class HttpAdminGateway(AdminGateway):
parsed = urlparse(normalized_url)
if parsed.scheme not in {"http", "https"} or not parsed.netloc:
raise ValueError("Admin 服务地址必须是有效的 http 或 https 地址")
if (
parsed.username is not None
or parsed.password is not None
or parsed.query
or parsed.fragment
):
raise ValueError(
"Admin 服务地址不能包含账号、密码、查询参数或片段"
)
if timeout_seconds <= 0:
raise ValueError("请求超时必须大于 0 秒")