Cloudflare Dynamic Workers

Run a worker that creates workers.

This demo shows both Dynamic Worker execution modes. The parent Worker injects a custom RPC binding, blocks outbound network access, and then forwards the request into sandboxed code loaded at runtime.

Try the endpoints

  • /api/load creates a fresh dynamic Worker for each request.
  • /api/get uses a stable ID so Cloudflare can reuse a warm isolate.
  • network=1 demonstrates that globalOutbound = null blocks fetches.

What the sandbox gets

{
  "GREETER": "RPC binding from parent worker",
  "DEMO_MODE": "load | get",
  "CACHE_ID": "dynwrk-demo:v1",
  "globalOutbound": null
}