Skip to content
Visit Workers on GitHub
Set theme to dark (⇧+D)

Known issues

Below are some known bugs and issues to be aware of when using Cloudflare Workers.

Route specificity

  • When defining route specificity, a trailing /* in your pattern may not act as expected.

Consider two different Workers, each deployed to the same zone. Worker A is assigned the* route and Worker B is given the* route pattern. With these in place, here are how the following URLs will be resolved:

// (A)*
// (B)*
// -> B
// -> B
// -> B

You will notice that all examples trigger Worker B. This includes the final example, which exemplifies the unexpected behavior.

wrangler dev

  • When running wrangler dev, all outgoing requests are given the cf-workers-preview-token header, which Cloudflare recognizes as a preview request. This applies to the entire Cloudflare network, so making HTTP requests to other Cloudflare zones is currently discarded for security reasons. To enable a workaround, insert the following code into your Worker script:
const request = new Request(url, incomingRequest)
return await fetch(request)