fix: 写接口限流、WS 有界与 token 不再进日志

新增进程内限流并挂到订单/档案写接口;WS 设 maxPayload、同连接串行处理、按用户限频;鉴权只读请求头并区分登录失效与用户服务故障;访问日志只记路径,避免 token 落盘;陪诊师列表分页夹紧。
This commit is contained in:
lik
2026-10-24 22:24:50 +08:00
committed by trae-solo-agent
parent f21b3711df
commit 68faf840cf
6 changed files with 154 additions and 14 deletions
+3 -1
View File
@@ -32,7 +32,9 @@ class APP {
const start = Date.now();
await next();
const ms = Date.now() - start;
console.log(`${ctx.method} ${ctx.url} - ${ctx.status} - ${ms}ms`);
// 只记录路径,不记录查询串:URL 里可能带 token、手机号等敏感参数,
// 一旦进入 access log 就等于把凭证/隐私落盘
console.log(`${ctx.method} ${ctx.path} - ${ctx.status} - ${ms}ms`);
});
}