From 0ffe19cfe632b0c28120627dc7f8ba29186f2b2d Mon Sep 17 00:00:00 2001 From: anonsaber Date: Mon, 28 Sep 2026 17:18:59 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20README=20=E4=B8=AD=E8=8B=B1=E5=8F=8C?= =?UTF-8?q?=E7=89=88=E8=A1=A5=E3=80=8C=E4=BF=9D=E6=8C=81=20debug=20?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E3=80=8D=E7=9A=84=E8=BF=90=E7=BB=B4=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用户结论:SAF-DEBUG-ALLOWLIST 那项不需要修,只要控制好不打开 debug 即可; 这条运维规则应写进面向用户的 README,不能只留在 deployment.md。 README.md / README.zh-CN.md(1:1)在既有「远程联调面」段各补两句: - 唯一的运行规则就是不要打开——启动命令不加 `--debug`、环境变量不设 `DEBUG_TOKEN`,缺任意一个 `/debug/*` 就不存在。 - 若确需为一次排障临时开启,先配好 chat 白名单——白名单为空时 `POST /debug/notify` 的测试发送不受限到任何 chat。 无新链接、无新锚点、无表格,纯散文;`docs/deployment.md` §2.1 引用沿用段内 既有引用。代码未改动,gate 基线不变(afa6cec,49/0/1)。 文档校验器 0 error(exit 0)。 --- README.md | 5 ++++- README.zh-CN.md | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6547204..23fa053 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,10 @@ that must stay cheap should watch the gateway's aggregated `/healthz`. business config, and a single Telegram send. It sits behind a two-factor gate — the process must be started with `--debug` **and** `DEBUG_TOKEN` must be set; miss either and the routes do not exist at all (requests fall through to a generic 404). Nothing under `/debug/*` is on -the gateway allowlist, so it is reachable only on the backend origin itself. See +the gateway allowlist, so it is reachable only on the backend origin itself. The only rule for +running it is to keep it off: leave `--debug` out of the start command and leave `DEBUG_TOKEN` +unset. If you do turn it on for a one-off diagnosis, configure the chat allowlist first — with +an empty allowlist the test send is not restricted to any chat. See `docs/deployment.md` §2.1. ## 4. Security boundary, in one sentence diff --git a/README.zh-CN.md b/README.zh-CN.md index 80e5103..b30be46 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -74,7 +74,9 @@ docker run --env-file .env -p 8080:8080 messageweave:latest `/debug/*` 是一套可选的远程联调面:JMAP 与 Telegram 实时探针、当前业务配置,以及单条 Telegram 发送。它由双因子开关控制——进程必须带 `--debug` **且** 已设置 `DEBUG_TOKEN`; 任一缺失则这些路由完全不存在(请求落到通用 404)。`/debug/*` 不在网关白名单内,因此只能 -直连后端 origin 访问。见 `docs/deployment.md` §2.1。 +直连后端 origin 访问。运行它唯一的规则就是不要打开:启动命令里不加 `--debug`,环境变量里不 +设 `DEBUG_TOKEN`。若确实要为一次排障临时开启,请先配好 chat 白名单——白名单为空时,测试 +发送不会受限到任何 chat。见 `docs/deployment.md` §2.1。 ## 4. 安全边界,一句话