One domain - reverse proxy?

I’d like to setup a reverse proxy for the landing page/posts of my website all under the same domain.

Example, my domain: foo.com:

How can I make this work? Do I need to code cloudflare workers for this? or is there a setting I can use for this?

I can answer this with a clear maybe.

If you look at Origin Rules (beta) · Cloudflare Rules docs, you can see that DNS record and Host header overrides are available on Enterprise agreements. This would allow you to achieve what you described.

You should be aware though that this might very well break the site because it would not change URLs in the html document and also cause CORS errors.

However, spending a few grand a month on this seems a bit excessive, so you’d maybe want to look at different options.

What other options do you know about? What about a cloudflare worker?

Is using a subdomain for either of the 2 sites completely out of the question?