A script for using Google Cloud Storage as a CDN in Cloudflare Worker
index.js
is the content of the Workers script.
Replace [YOUR_BUCKET_NAME]
in index.js
with your own bucket name.
Replace [YOUR_CLOUDFLARE_ACCOUNT_ID]
in wrangler.toml
with your cloudflare
Publish your Cloudflare Worker by typing below commands in terminal:
$ wrangler build
$ wrangler publish