Worker 522 with custom domain name

Error 522 occurs when Cloudflare times out contacting the origin web server. Two different timeouts cause HTTP error 522 depending on when they occur between Cloudflare and the origin web server: https://redirect-willin-love.willin.workers.dev/ --> works https://demo.willin.love/ --> 522
Willin Wang Free Domains
Welcome to Remix!
9 Replies
Erisa
Erisa11mo ago
You can't have wildcard custom domains. What you can do is: * Delete the custom domain * Add a DNS record of type AAAA on * pointing to dummy IP 100:: * Add a Worker route of *.willin.love/*
willin
willinOP11mo ago
after this setting... worker domain does not work
willin
willinOP11mo ago
Willin Wang
To be Willin is to be willing.
Erisa
Erisa11mo ago
Ah Youll need to also add a sso.v0.md/* route that goes to that Worker Since the route overrides the custom domain
willin
willinOP11mo ago
= = i meet with a new issue i have a worker with custom domain example.com, and a worker example.com/api/* local use vite server proxy works when visit example.com/api/xxx turns to api worker, however when i use fetch from example.com... it comes to 404 page
Erisa
Erisa11mo ago
Same-zone subrequests will always go the origin server by design and not other workers, to fetch another Worker you (sadly) have to put it on another zone or use the workers.dev
willin
willinOP11mo ago
will it work if i want to use multiple workers: - worker1: api.example.com/* --> will this cover all requests? - worker2: api.example.com/v1/* - worker3: api.example.com/v2/*
Erisa
Erisa11mo ago
More specific routes win, so worker1 would run on everything except for /v1/ and /v2/
willin
willinOP11mo ago
ok. i'wll change my design thank you
Want results from more Discord servers?
Add your server