Serving content from subfolder in R2 bucket on a subdomain

327 Views Asked by At

I have an r2 bucket with content in subfolders like:

  • MY_BUCKET/subfolder1/index.html
  • MY_BUCKET/subfolder2/index.html
  • MY_BUCKET/subfolder3/index.html

How I can configure my cloudflare site to serve content from these subfolders on subdomain of my site like this:

  • subfolder1.mysite.com would serve content from MY_BUCKET/subfolder1/index.html
  • subfolder2.mysite.com would serve content from MY_BUCKET/subfolder2/index.html
  • subfolder3.mysite.com would serve content from MY_BUCKET/subfolder3/index.html

If possible, I would like to do so without writing a custom cloudflare Worker.

Ideally, I want a wildcard subdomain configuration

0

There are 0 best solutions below