Cloudflare worker following example bypasses cache

Hello, I created a worker following these steps:

I made two customizations to it;

  • Following the referred github repo, i changed the way the headers are being added to the response (the code on the cloudflare page above does not respond with a cf-cache-status header.

  • Instead of a Google Cloud bucket, I am working with a Backblaze B2 bucket.

The code does proxy requests properly, returning objects from the bucket as expected, however the cf-cache-status always reports “BYPASS”.

I am using the Free plan. Am i doing anything wrong or missing something ?

I am somewhat certain this occurred because {"cache-control":"max-age=86400"} was not set in the B2 Bucket info, and so cloudflare did not cache it because it was receiving a 'cache-control' => 'max-age=0, no-cache, no-store' header.

I am continuing to test.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.