Jquery not being loaded through Cloudflare Workers

Hi,

The same jQuery (on a regular site) is not loading on a site that runs via a Cloudflare Worker.

pipelinenova.com/blog runs via a Cloudflare Worker and is throwing a jQuery error. The same jQuery that is on valsopi.com works just fine.

This is what I am using for the Cloudflare Worker on pipelinenova.com/blog

addEventListener('fetch', event => {
  event.respondWith(handleRequest(event.request))
})

async function handleRequest(request) {
  const url = new URL(request.url)
  url.hostname = 'pipes.bstatic.io'
  url.pathname = url.pathname.replace(/^\/blog(\/)?/, '/')

  const response = await fetch(url)

  return new HTMLRewriter().on('[href]', {
    element(e) {
      let href = e.getAttribute('href')
      if (href.startsWith('/')) {
        href = `/blog${href}`
      } else if (href.startsWith('https://pipes.bstatic.io/')) {
        href = href.replace('https://pipes.bstatic.io', '/blog')
      }
      e.setAttribute('href', href)
    }
  }).on('[src]', {
    element(e) {
      let src = e.getAttribute('src')
      if (src.startsWith('/')) {
        src = `/blog${src}`
      } else if (src.startsWith('https://pipes.bstatic.io/')) {
        src = src.replace('https://pipes.bstatic.io', '/blog')
      }
      e.setAttribute('src', src)
    }
  }).transform(response)
}

If anyone has any clue to why this is happening?