Debug requests CF Worker

I have configured this CF Worker. In theory, it should do 1 request per invocation.
However, activating the Worker Logs, I see it’s doing 3 requests per invocation.

The first and last requests are empty. The valid request is the second one.

The first and last requests have the following data:

1st request

 "outcome": "ok",
  "scriptName": null,
  "exceptions": [],
  "logs": [],
  "eventTimestamp": null,
  "event": null,
  "id": 0

3rd request

"outcome": "canceled",
  "scriptName": "cdn",
  "exceptions": [],
  "logs": [],
  "eventTimestamp": null,
  "event": null,
  "id": 2

Why is this happening and how to solve it?

Anyone that can help me out? This is the Worker JS code I’m using: Cloudflare worker to bypass Instagram new cross-origin policy on images (fixes net :: ERR_BLOCKED_BY_RESPONSE ) · GitHub

I still don’t know why the CF Worker is making 3 requests instead of 1.

They aren’t requests from the worker @hustleou, they are requests to the worker.

Yes, I am aware of that. But still, I don’t understand why 3 and not 1.

Who, or what, is making the request to the worker? What is the origin of the request?

A normal visitor is making the request to the worker. It gets invoked on page load. This is the code I am using for the Worker: Debug requests CF Worker - #2 by hustleou