fix(monitors): rate limit heartbeats per token and kind; test limiter key and fail body cap

This commit is contained in:
mrhid6 committed 2026-09-17 09:22:50 +00:00
1 parent 2afdc267f8
commit 13e7160405
3 files changed
+72 -13

No files matched your search

-1
View File
@@ -26,7 +26,6 @@ test("heartbeat monitor: URL ping, /fail, header ping", async ({ page, request }
let got = await (await page.request.get(`${BASE_URL}/api/monitors/${monitor.monitor_id}`)).json();
expect(got.state.status).toBe("up");
await new Promise((r) => setTimeout(r, 1100)); // per-token limit is 1/s
const fail = await request.post(`${BASE_URL}/public/hb/${monitor.heartbeat_token}/fail`, { data: "disk full" });
expect(fail.status()).toBe(200);