MessageWeave/cloudflare-worker/src
anonsaber 0cee50b4c9 feat: read business config back and accept partial patches
GET /api/business-config returns the stored values with presence-only secrets, and PUT now merges a patch against the stored config instead of replacing it, so the SPA can show what is already set and send back only the fields that changed.

The SPA marks secrets as set-but-unreadable, edits chat_allowlist as an unordered set, and omits fields it did not touch; blank required fields keep the stored value, blank optional fields clear it. The read-back is Serialize-only, so a client cannot inject secrets_present.

Forward both paths at the gateway: /api/business-config accepted PUT only, so the read-back returned 405, and the preflight path was missing from the safelist entirely, so it returned 404. The SPA is served from the Worker domain, so the whole edit experience was unreachable behind the production gateway. Route methods are now asserted per path, which the safelist test never checked.

Also: /debug/config reports timezone again, the timezone select is styled like the other fields, and the docs follow the new contract.
2026-09-30 00:53:58 +08:00
..
backends.js feat: read business config back and accept partial patches 2026-09-30 00:53:58 +08:00
health.js worker: /reconcile 走 per-route 长超时且绝不故障转移(01a0e595) 2026-09-28 12:18:04 +08:00
index.js feat: read business config back and accept partial patches 2026-09-30 00:53:58 +08:00
lb.js chore(worker): rename proxy to lb and ignore build cache 2026-09-27 12:52:55 +08:00