Multiple Servers/IPs for Same Domain

We are needing proxy specific paths from a server other than our main one, but serve them to the same domain. So for example the main website is sourced from a main server/IP, and specific paths live on another server with a different IP. Is it possible to map specific paths to a specific location in Cloudflare? And is there documentation and examples for how to do this?

domain.com <---- sourced from main server (already configured)
domain.com/path1 <---- sourced from https:// 12.345.678.9/path1
domain[dot]com/path2 <---- sourced from https:// 12.345.678.9/path2
[everything else]* <---- sourced from main server (already configured)

There are a handful of examples in the Recipe Exchange. Here’s one:

Thank you @sdayman! Workers seems to be what I’m looking for, and specifically this: Respond with another site · Cloudflare Workers docs

Will workers, like in the example, cache the resource that’s being fetched?

addEventListener("fetch", event => {
  return event.respondWith(
    fetch("https://example.com")
  )
})

In this case will example.com be cached through Cloudflare?

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.