Cloudflare Worker Routing

Hello All,

I’m setting up a worker to proxy from a subdomain to the main URL of a site, the proxy functionality works when going from to but not with the routes for I’ve attached some screenshots and the script below, any help or ideas would be great.

addEventListener('fetch', event => {



  • Respond to the request
  • @param {Request} request
    async function handleRequest(request) {
    let newURL = new URL(request.url)
    newURL.hostname = ‘’
    request = new Request(newURL, request)

return await fetch(request)

Many thanks