feat: 优化设置布局并支持管理端地址切换 (#130)
This commit is contained in:
@@ -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 秒")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user