Hello👋 According to the Custom Domains for Workers (published 12.05.2022) feature it should be now possible to call workers within the same zone.
So I quickly jumped in and created some tests on what is fetching and whats not.
Setting:
- App Worker: app.domain.tld, app.user.workers.dev
- Api Origin Worker: api.domain.tld, api-origin.user.workers.dev
- Api Worker: api.user.workers.dev (not affiliated with the domain)
- No additional other route information given on the involved workers.
Outcome:
- app.domain.tld
api.domain.tld
“” (empty return)
- app.domain.tld
api-origin.user.workers.dev
- app.domain.tld
api.user.workers.dev
- app.user.workers.dev
api.domain.tld
- app.user.workers.dev
api-origin.user.workers.dev
“error code: 1042”
- app.user.workers.dev
api.user.workers.dev
“error code: 1042”
Should it really be like that? Don’t think so. Most importantly, case 1 should work by the blog post but is completely not with an utterly empty response which is hard to debug. Is there any misconfig on my side when omitting the “old routes” config?