I've just added a Worker on the Cloudflare Dashboard for my website: it works in the debugger but doesn't work when I query the site. Why is that? Is there anything to activate or anything I could check?
Dear <customer name>,
As a starting point in the troubleshooting of this issue, I encourage you to check that your Worker is connected to an external endpoint such that it can be accessed by the Internet to receive inbound HTTP requests.
The workers will trigger for the requests matching the routes you configure, so it’s important your route configuration includes the exact domain you want to intercept.
Also, make sure that the route is specific enough to be triggered on the requests; otherwise, it can be overridden by other routes.
More information here:
https://developers.cloudflare.com/workers/configuration/routing/
Last but not least, ensure that you have in fact deployed your Worker to Cloudflare:
# wrangler deploy [SCRIPT] [OPTIONS]
The Worker debugger runs your latest code instantly, but you have to actually deploy your Worker for live site operations.
More information:
https://developers.cloudflare.com/workers/wrangler/commands/#tail
Please verify the mentioned possible causes, and if none of them apply, don’t hesitate to contact us for further troubleshooting.
Best Regards,