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
Erisa12mo 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
willinOP12mo ago
after this setting... worker domain does not work
willin
willinOP12mo ago
Willin Wang
To be Willin is to be willing.
Erisa
Erisa12mo 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
willinOP12mo 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
Erisa12mo 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
willinOP12mo 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
Erisa12mo ago
More specific routes win, so worker1 would run on everything except for /v1/ and /v2/
willin
willinOP12mo ago
ok. i'wll change my design thank you
Want results from more Discord servers?
Add your server