# Cloudflare Worker that serves oversize archive zips from R2 on a free # *.workers.dev subdomain. Deploy it ONCE for the whole instance (NOT per site): # # cd r2-proxy && pnpm dlx wrangler deploy # # One bucket + one Worker serves every export site (keys are namespaced by site # id). See ../PUBLISH.md for the full setup. name = "archilyzer-exports" main = "src/index.ts" compatibility_date = "2025-06-01" workers_dev = true # The R2 bucket holding oversize archives — set bucket_name to the SAME bucket # you entered in the editor's "Archive overflow storage" setting. [[r2_buckets]] binding = "BUCKET" bucket_name = "archilyzer-exports" # Native per-edge rate limiting (free, no extra infrastructure). 60 requests per # 60s per client IP + file. Tune `limit` to taste; `period` must be 10 or 60. # (wrangler prints an "unsafe fields are experimental" warning for this binding — # that is expected; the Rate Limiting binding lives under `unsafe` for now.) [[unsafe.bindings]] name = "RATE_LIMITER" type = "ratelimit" namespace_id = "1001" simple = { limit = 60, period = 60 }