refactor(ca): v1.1.0 配置体系重构为纯 CLI 传递
- 移除 confs 依赖:删 Conf.hpp 与 confs/configs/ca.ini,配置加载改为 CLI > 环境变量 > 默认值三层(与 dnfs2 同模式) - 新增 16 个配置选项,env 以 CA_* 为主并兼容旧名(LISTEN_ADDR/UPSTREAM_GATEWAY/DB_* 等),启动时配置完整性校验 - 原 ca.ini 配置值迁入 core/services.yaml ca 条目 args - 修复伪造 Token 触发 500:verify_token 统一捕获 RSA 验签异常,按验签失败返回 401(符合黑盒 B3/B4 契约) - 同步更新 ca/README.md 与根 README.md
This commit is contained in:
1 parent
8b6eb47c80
commit
9d548c064f
8 files changed
+244
-302
No files matched your search
+37
-1
@@ -76,7 +76,43 @@ services:
|
||||
|
||||
- name: ca
|
||||
cmd: bash /opt/micro_servers/ca/_run.sh
|
||||
args: ["--instance", "ca", "--log-level", "info"]
|
||||
args:
|
||||
- "--instance"
|
||||
- "ca"
|
||||
- "--log-level"
|
||||
- "info"
|
||||
# --- v1.1.0:配置全部经 CLI 传递(原 confs/configs/ca.ini 迁入) ---
|
||||
- "--host"
|
||||
- "127.0.0.1"
|
||||
- "--port"
|
||||
- "8443"
|
||||
- "--upstream-gateway"
|
||||
- "http://127.0.0.1:8445"
|
||||
- "--token-keep-time"
|
||||
- "3600"
|
||||
- "--token-refresh-grace-multiplier"
|
||||
- "2"
|
||||
- "--token-max-refresh"
|
||||
- "10"
|
||||
# 管理员白名单(分号分隔):登录命中时 Token 写入 is_admin=true
|
||||
- "--admin-users"
|
||||
- "1776177662@qq.com;277665039@qq.com"
|
||||
- "--cors-origins"
|
||||
- "https://qsont.me;https://www.qsont.me;http://127.0.0.1:8443;http://localhost:8443"
|
||||
- "--ws-proxy-routes"
|
||||
- "/ws/aibox=ws://127.0.0.1:8765"
|
||||
- "--db-host"
|
||||
- "127.0.0.1"
|
||||
- "--db-port"
|
||||
- "8005"
|
||||
- "--captcha-host"
|
||||
- "127.0.0.1"
|
||||
- "--captcha-port"
|
||||
- "8009"
|
||||
- "--smtp-host"
|
||||
- "127.0.0.1"
|
||||
- "--smtp-port"
|
||||
- "8008"
|
||||
depends_on: [db2]
|
||||
sleep_before: 2
|
||||
|
||||
|
||||
Reference in new issue
Block a user