fix(serve): error handling, CORS, body limit, CAS store reuse #136
Reference in New Issue
Block a user
Delete Branch "fix/120-serve-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Serve API hardening — all 9 items from PR #119 review.
Why
Production readiness: proper error responses, security restrictions, performance.
Changes
onErrorhandler (500 JSON), CORS restricted to localhost, 1MB body limit middleware (413)Ref
Closes #120. 268 tests pass (262 existing + 6 new).
PR #136: serve 加固 ✅
CAS store 复用(每次请求不再 new)、CORS 白名单、body limit 1MB、全局错误处理 → 500 JSON。测试覆盖 5 个新 case,全面。LGTM。