Someone is using Cloudflare Workers to scrape my website and fetch it's content (Workers.dev)

Someone is using Cloudflare workers to scrape my website and fetch all content from it, I have tried blocking various methods such as Workers.dev, Host, Origin, Referrer However blocking the request method https1/1 only seems to work (But will also interfere with my website). Blocking 1/1 and checking events I see no real clues on what I can do to block the Cloudflare workers as the firewall events only show up as unique users, not that the request comes from the worker. How can I handle this?
9 Replies
Erisa
Erisa9mo ago
You need to write a custom expression based on cf.worker.upstream_zone e.g. (cf.worker.upstream_zone ne "" && cf.worker.upstream_zone ne "yourdomain.com")
Userpass
UserpassOP9mo ago
Thank you! So just using this (Changing to my domain (for example, example.com)) Should dissalow Cloudflare workers from working on the site? Or would I have to specify deeper into like which workers.dev domain it comes from?
Erisa
Erisa9mo ago
the ne is "not equal" so it will deny any workers running on zones other than the domain you specify (which is your own) Let me just double check something though Before you use it
Userpass
UserpassOP9mo ago
I see, I am not using Cloudflare workers at all and I can see that the website using them to scrape my website is attaching this code at the end "&referer=https:// domain here"
Erisa
Erisa9mo ago
Okay yeah correcting myself its actually To block all Workers: (cf.worker.upstream_zone ne "") To block all except yours: (cf.worker.upstream_zone ne "" && cf.worker.upstream_zone ne "yourdomain.com") You can use the top one in this case
Userpass
UserpassOP9mo ago
Thank you very much for the swift support
Erisa
Erisa9mo ago
No description
Erisa
Erisa9mo ago
We intentionally provide these features so that customers that don't want requests from Workers can reject them with whatever criteria they wish
Userpass
UserpassOP9mo ago
Much appreciated once again, have a lovely week!
Want results from more Discord servers?
Add your server