From da7abf4054854ebcf24710f3e45f484c675c962f Mon Sep 17 00:00:00 2001 From: localhost Date: Sat, 3 Oct 2026 17:58:18 +0200 Subject: [PATCH] fix(cold): read stats cookie from environment --- cold/checkStillUp.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/cold/checkStillUp.ts b/cold/checkStillUp.ts index 3e46687..5b51ee0 100644 --- a/cold/checkStillUp.ts +++ b/cold/checkStillUp.ts @@ -134,6 +134,7 @@ async function getPageViewsWithRetry(id: string, retries = 3, delay = 1000): Pro for (let attempt = 1; attempt <= retries; attempt++) { try { const response = await fetch(`https://a.gloe.net/api/stats/preservetube.com/top-stats?period=all&date=2026-04-29&filters=%7B%22page%22%3A%22%2Fwatch%2F${id}%22%7D&with_imported=true&comparison=previous_period&compare_from=undefined&compare_to=undefined&match_day_of_week=true`, { + headers: process.env.PLAUSIBLE_COOKIE ? { cookie: process.env.PLAUSIBLE_COOKIE } : undefined }) if (response.ok) { const aJson = await response.json() as any