diff --git a/utils/fetch-and-cache.ts b/utils/fetch-and-cache.ts index 46f8fe4..8b92900 100644 --- a/utils/fetch-and-cache.ts +++ b/utils/fetch-and-cache.ts @@ -588,6 +588,10 @@ export async function fetchHeaders( }); const contentType = response.headers.get("content-type"); + + // We only need headers from the HEAD probe. Explicitly cancel the response + // so Cloudflare does not keep the request counted as in-flight. + try { await response.body?.cancel(); } catch { /* ignore cancel errors */ } return { url: finalUrl, contentType, fromCache }; } catch (_) {