Worker is logging requests when website is making no requests
I built a Worker to handle form requests for my website and put the data to different services I use.
According to my Cloudflare back office... my Worker is logging multiple requests over the last day but none of my forms have actually be submitted.
Where are these requests coming from. I am guessing the only way I can truly find out if setting up logging?
13 Replies
Random bots on the internet may be hitting your Worker, providing data which it isn't equipped to handle, and causing it to error. This would show up as a billable Request, but wouldn't actually log a submitted form, since it didn't succeed.
Check the number of errors in your Workers' statistics.
That's what is strange. I have a 100% success rate. 0% errors.
Not sure if there is something else going on... on the subrequests... I am getting a bunch of uncached subrequests.
Does this mean my worker code is calling one of my services and erroring out?
Are you
try/catch
ing the entire request? If so, it may show as a success, even if it isn'tYeah good point. I do try catch... is there a way to block these requests? I have a custom auth "solution" that responds with a 401. But I guess that is still successful huh?
You can use the WAF. First though, you need to know what they are doing, to make sure you only block them, and not legitimate traffic. Do you have LogPush enabled?
No I'll have to look at the docs and get that set up
Are you on Enterprise?
no... just paid for Workers and a couple other services
Is your Worker on a custom domain?
no
Without a custom domain, afaik, there isn't a way to block those requests, or at least not in a way that would prevent you from being billed.
ok... thanks for helping clear some things up.
No problem!