fix(cycle): raise the calendar feed fetch limits

A link subscribed on a phone, a tablet and a computer at a five-minute
refresh came close to the 30 fetches an hour a link was allowed, and a
household behind one address shared 120. The per-link bucket is now 120
an hour and the per-address one 600. The token is a random secret checked
by its HMAC, so guessing links is not what these limits stop.
This commit is contained in:
Marc-André Bombeck committed 2026-11-07 01:33:19 +01:00
1 parent 78611277fe
commit aea9796170
3 files changed
+14 -8

No files matched your search

@@ -510,7 +510,7 @@ describe("fetching the feed", () => {
it("throttles a well-formed unknown token through the anonymous limit", async () => {
let throttled = false;
for (let i = 0; i < 130 && !throttled; i++) {
for (let i = 0; i < 610 && !throttled; i++) {
const res = await fetchFeed(`hlf_${"1".repeat(48)}.ics`);
if (res.status === 429) throttled = true;
else expect(res.status).toBe(404);