Patch Changes
-
#12655
a31ee0bThanks @petebacondarwin! - Migrate workers-playground from Cloudflare Pages to Cloudflare WorkersReplace the Cloudflare Pages deployment with a Workers + static assets deployment.
In production (
wrangler.jsonc), this is an assets-only Worker with no code entry point — theplayground-preview-workerhandles all routing and proxying in front of it.For local development, a separate config (
wrangler.dev.jsonc) adds a Worker entry point (src/worker.ts) that replicates the proxying behavior of the productionplayground-preview-worker. It proxies/playground/api/*requests to the testingplayground-preview-worker, and for the/playgroundroute it fetches an auth cookie from the testing endpoint, transforms it for local use (strippingSameSite/Securedirectives and replacing the testing origin withlocalhost), and injects it into the response so the preview iframe can authenticate.The
playground-preview-workerreferer allowlist is updated to also accept requests from*.workers-playground.workers.dev(in addition to the existing*.workers-playground.pages.dev).