Workers calling themselves?


#1

Question … I have a Worker which posts logs to a logging service. See the worker here: https://logflare.app/

I actually had that worker enabled on the logflare.app domain so I could post logs to myself but then I wondered if that was the right thing to do, as a request to logflare.app will generate a subrequest to logflare.app which would then generate another subrequest to logflare.app.

How does that work? Was it looping? I deleted the worker after I started to get some usage on it because I thought I was seeing multiple requests for one in the nginx logs.

Just wanted to get some confirmation before enabling anything again. I think I could setup an endpoint for myself on another domain outside of Cloudflare so I can see my own logs. Anyways, just curious if you all had seen that before?

Thanks!!


#2

This is super cool, really glad you built it!

In general a Worker can’t trigger itself, there are automatic systems in place to prevent circular executions.