Cloudflare Worker Issue: 522 Timeout on ALL Outbound Requests
Setup: I'm building a SaaS proxy where customers get custom domains that route to specific paths on my DigitalOcean app. Using Cloudflare Worker as reverse proxy.
The Flow:
User visits chattest.mori.style
Cloudflare Worker looks up path prefix from KV store
Worker should fetch from service-frontend-qaarf.ondigitalocean.app/assistant/[uuid]/
Return the content to user
The Problem: Getting 522 timeout errors. Worker executes but fetch() to origin fails.
Debugging Journey:
✅ DNS resolution works
✅ SSL certificate active
✅ Worker triggers correctly
✅ KV lookup successful
✅ Origin server responds to direct curl (200 OK)
❌ Worker's fetch() to origin times out
The Plot Twist: Even simplified worker that just fetches google.com gives 522 timeout! This proves it's not my DigitalOcean app - it's the Worker's outbound networking.
Current Status: Worker can't make ANY external requests, even to Google. This suggests a platform-level issue with my Worker's networking.
My question is, What can cause this?
Code: Simple test case that fails:
Help appreciated! 🤔
1 Reply
and check you don't have any origin rules overriding where the requests go