I know workers are on edge and serving as nearest as possible
just want to know if this is possible
example im in US when I request to my workers
so it will resolve from US (nearest)
so what if, for some reason i want to pull it from different region?
example Europe? or Asia?
can i tell Cloudflare to forward my request to Asia?
can i do it by setting headers? or something?
currently im using VPN to deal with this problem
just want to know if there’s some good way in solving this
When you request a Worker, it goes to the nearest datacenter closest to the user who requested it. There is no way to change what datacenter it gets served from.
What is your reason for wanting a different data center?
ahmmm just for testing
if region is US. use function1 to resolve
if region is Asia. use function2
something like that
Workers does not work like that. If you have
worker1.example.com then it will be served to everyone around the globe. You could make three workers.
Worker1 would send the requests to
worker3 depending on the requests came from. You can not define
worker1 to only server the US and
worker2 to only server Asia. Both workers would serve both unless you make WAF rules to block.
just another question
so example i have
then if request came from Asia. it will resolve to US?
i mean US worker will answer me?
or will ignore because they only allow request from us?
i mean i also have WAF to allow only US
im not familiar in WAF
when you allow only US. then if request came from other region it will block?
or it will only serve on US. i mean all request will routed to US
It depends on what you mean by resolve. If you mean by what DNS records are returned, then it will be a Cloudflare IP no matter where you are on the global. If you mean by where the request will be handled, then usually it will be the data center closest to the user who made the request.
It is this option. If you make a WAF rule to only allow the US, any other country that tries to request your worker will be blocked.
thank you for helping me catch up the idea
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.