Proxying of a site by specific path

Hi, I have a site with domain blog.example.com, it’s wordpress and nginx. Also, I have another host example.com and I want to route example.com/blog/* to blog.example.com.

I use worker and added route example.com/blog/*

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

async function handleRequest(request) {
  return fetch(new Request('`https://blog.example.com/`', request))
}

Having connect to example.com/blog, I get 302 response to blog.example.com, but I want to stay in example.com/blog.

How to disable reirect? I tried to discovery Transform Rules, but I confused

Ok, I did it by Pages Rules:

resource "cloudflare_page_rule" "blog" {
  zone_id  = cloudflare_zone.zone.id
  target   = "example.com/blog/*"
  priority = 1
  status   = "active"

  actions {
    resolve_override = "blog.example.com"
  }
}

Also I added rewriting in nginx which drop /blog/, but I hope I’ll can do it by Transform Rules