refactor: reuse global aliyun moderation config
This commit is contained in:
@@ -112,20 +112,27 @@ IM Server
|
||||
|
||||
#### 6.1 阿里云服务配置
|
||||
|
||||
复用 `im_external_config` 的 `service=moderation`,只允许平台管理员维护:
|
||||
复用 `im_external_config` 的 `service=moderation`,只允许平台管理员维护审核策略参数。阿里云账号与连接参数统一复用 `hg_sys_config` 的 `im_third_party` 分组,不在商户审核配置中重复保存:
|
||||
|
||||
| 配置 | 说明 |
|
||||
| --- | --- |
|
||||
| `provider` | 固定 `aliyun_green` |
|
||||
| `endpoint` | 默认 `green-cip.cn-shanghai.aliyuncs.com` |
|
||||
| `enabled` | 平台总开关 |
|
||||
| `config_json.region_id` | 默认 `cn-shanghai` |
|
||||
| `config_json.nickname_service` | 默认 `nickname_detection_pro` |
|
||||
| `config_json.chat_service` | 默认 `chat_detection_pro` |
|
||||
| `config_json.timeout_ms` | 单次请求超时,建议 1000~2000 ms |
|
||||
| `config_json.failure_mode` | `allow` 或 `block` |
|
||||
| `secret_json.access_key_id` | 只写不回显 |
|
||||
| `secret_json.access_key_secret` | 只写不回显 |
|
||||
|
||||
公共配置来源如下:
|
||||
|
||||
| `hg_sys_config` 键 | 说明 |
|
||||
| --- | --- |
|
||||
| `im_third_party.aliyun_access_key_id` | 阿里云 AccessKey ID |
|
||||
| `im_third_party.aliyun_access_key_secret` | 阿里云 AccessKey Secret |
|
||||
| `im_third_party.aliyun_green_region_id` | 内容安全地域,默认 `cn-shanghai` |
|
||||
| `im_third_party.aliyun_green_endpoint` | 内容安全端点,默认 `green-cip.cn-shanghai.aliyuncs.com` |
|
||||
|
||||
`im_external_config.secret_json` 不再保存内容审核密钥;升级时清空历史重复密钥。Admin Server 的内部接口负责把平台总开关、场景服务参数和公共阿里云配置合并后下发给 IM Server。
|
||||
|
||||
“检查配置”必须真实调用阿里云测试文本,返回成功与否、耗时、RequestID 和脱敏错误,不能只检查字段非空。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user