4.8.12 test fix (#2988)

* perf: qps limit

* perf: http response data

* perf: json path check

* fix: ts

* loop support reference parent variable
This commit is contained in:
Archer
2024-10-25 16:34:26 +08:00
committed by shilin66
parent eb28734a63
commit 8df886452e
14 changed files with 144 additions and 122 deletions

View File

@@ -19,8 +19,11 @@ export const NextEntry = ({ beforeCallback = [] }: { beforeCallback?: Promise<an
await Promise.all([withNextCors(req, res), ...beforeCallback]);
let response = null;
for (const handler of args) {
for await (const handler of args) {
response = await handler(req, res);
if (res.writableFinished) {
break;
}
}
// Get request duration