Restricting worker access?

Hi, is it possible to restrict the domain that workers are called from?
4 Replies
nir4
nir44mo ago
yes you can add different routes to your worker or reject traffic in the worker based on the hostname
Nick
Nick4mo ago
hey neu, thanks for the reply - is that by firewall rule?
Beny
Beny4mo ago
No it's configured on the worker itself. You can read about it here: https://developers.cloudflare.com/workers/configuration/routing/routes/#set-up-a-route
Cloudflare Docs
Routes · Cloudflare Workers docs
Routes allow users to map a URL pattern to a Worker. When a request comes in to the Cloudflare network that matches the specified URL pattern, your …
Nick
Nick4mo ago
Thanks a lot Beny, I'll have a read