Workers Reverse Proxy Assets


I am trying to set cloudflare workers up as a reverse proxy. Aim is to have to load data from and to load data from and to load data from

There will be other routes for both of these, but this is enough for an example hopefully. Both of these are apps hosted on Vercel.
I have two basic workers that look like

addEventListener('fetch', event => {

async function handleRequest(request) {
  const url = new URL(request.url)
  const hostname = ''
  return fetch(`${hostname}${url.pathname}`)

They are loading the site (see but everything in _next/static/* and external images are not loading. They just error with 522 if you look in the console.

Everything I can find points me to the most basic “Conditional Routing” example, which doesn’t contain this logic. All of the examples are really basic and I can’t find any decent, fleshed out reverse proxy with workers code.
Ideally I want a reverse proxy with assets and caching if anybody has an example?

I have also just noticed if I access it via the url, it works totally fine.

Also my DNS setup for this subdomain is