Direct link to the article Proxying Third-Party JavaScript as First-Party JavaScript (and the Potential Effect on Analytics)

Proxying Third-Party JavaScript as First-Party JavaScript (and the Potential Effect on Analytics)

First, check out how incredibly easy it is to write a Cloudflare Worker to proxy another URL:

addEventListener("fetch", (event) ={
  event.respondWith(
     fetch("https://css-tricks.com")
  );
});

It doesn’t have any error handling or anything, but hey, it works:…

Avatar of Chris Coyier
Chris Coyier on