Cloudflare 中文文档
Cloudflare for Platforms
Cloudflare for Platforms
编辑这个页面
跳转官方原文档
Set theme to dark (⇧+D)

Create a dynamic dispatch Worker

After you have created a dispatch namespace, you can fetch any user Workers in the namespace using a dynamic dispatch Worker. The dynamic dispatch Worker has a namespace binding.

Use any method of routing to a namespaced Worker (reading the subdomain, request header, or lookup in a database). Ultimately you need the name of the user Worker.

In the following example, routing to a user Worker is done through reading the subdomain <USER_WORKER_NAME>.example.com/*. For example, my-customer.example.com will run the script uploaded to PUT accounts/<ACCOUNT_ID>/workers/dispatch/namespaces/my-dispatch-namespace/scripts/my-customer.