I have two Workers that need to share the same domain with path-based routing: - Site Worker: Should handle sub.domain.com/* (everything except API) - API Worker: Should handle sub.domain.com/api/* (API endpoints only)
Problem: - sub.domain.com/ → Works (site worker) - sub.domain.com/api/ → 404 (should hit API worker)
What we've tried: - Both workers deploy successfully - Individual subdomains work (api.sub.domain.com) - Adding API routes breaks subdomain routing entirely - Removing routes from API worker temporarily fixes subdomain but no path routing - Different route pattern combinations
Both workers deploy successfully, but API routes return 404. Do I need to remove custom domains from one worker? Is the route pattern syntax correct for excluding /api/* from the site worker?
Any guidance on proper multi-worker routing appreciated!