The solution to using a custom domain in a Cloudflare worker is make use of custom_domain
option from the route config for wrangler
wrangler.toml
, add or modify your route entry to route = { pattern = "yourdomain.com" , custom_domain = true }
wrangler publish