Setup base path

I would like to setup root directory from Origin as my base base path for Edgio. How to achieve this?

Example:

Edgio:
https://cdn.domain.com/directory/file.jpg?Par=1&Par=2

Origin:
https://origin.domain.com/root/directory/file.jpg?Par=1&Par=2

If I understand correctly, you should be able to do the following to rewrite the URL prior to the request being made to your origin.

EdgeJS:

router.match('/directory/:path*', {
  comment:
    'Rewrite path /directory/* to /root/directory/* before sending it to the origin',
  url: {
    url_rewrite: [
      {
        source: '/directory/(.*)',
        destination: '/root/directory/$1',
        syntax: 'regexp',
      },
    ],
  },
});

Console UI: