Restricting worker access?

Hi, is it possible to restrict the domain that workers are called from?
4 Replies
zees
zees13mo ago
yes you can add different routes to your worker or reject traffic in the worker based on the hostname
Nick
NickOP13mo ago
hey neu, thanks for the reply - is that by firewall rule?
Beny
Beny13mo 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
NickOP13mo ago
Thanks a lot Beny, I'll have a read

Did you find this page helpful?