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
Walshy
Walshy•3mo ago
What is your content type
Vamshi59
Vamshi59OP•3mo ago
Hello from R2 which is Renderd is coming from Worker’s dev URL and raw HTML source. coming from my custom domain the same files we deployed in different account it working fine
No description
No description
Vamshi59
Vamshi59OP•3mo ago
5 mins text/html

Did you find this page helpful?