Worker serves raw HTML instead of rendering on custom domain
Hi everyone đź‘‹
I deployed a Worker that serves static files (from R2) including index.html.
On the Worker’s dev URL → the page renders fine.
On my custom domain (bound to the Worker) → instead of rendering, the browser shows the raw HTML source.
I suspect the Content-Type header isn’t being set correctly, but I’m not sure if any WAF/security rule could also cause this.
I checked Cloudflare Security → Events, and requests look allowed.
Question: How can I debug why the Worker on the custom domain isn’t sending the right headers (or being treated differently than the dev URL)?
Thanks 🙏
3 Replies

