Cloudflare worker fetch returning stale data in production

Hi team, when I call my worker from my local machine to it's prod URL, an external API i'm calling using fetch returns an empty array which is expected. However, when a server hosted on AWS calls this cloudflare worker which then calls an external API, it starts returning stale data. I'm not sure why this is happening. This is how I've been calling the fetch let response = await fetch(url, { method: options.method, headers: { Authorization: Bearer ${env.API_KEY}, 'User-Agent': 'CF-Worker-API-Client/1.0', 'Cache-Control': 'no-cache, no-store, must-revalidate', }, cf: { cacheTtl: -1 // Bypass Cloudflare's cache } });
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server