Originally I want to just reply to Reverse Proxy using Page Rules but since it is closed, I’m forced to create a new topic.
This was originally, but as I have found the answer I’m posting it here so that other people having the same question can find it.
The question: Can I use Cloudflare to serve a domain (say example .com) using two different servers based on path, i.e.:
example .com -> origin1.amazonaws .com example .com/blog -> origin2.amazonaws .com
Note that the
Host header is never changed.
All answers (@Judge) so far always mention this:
rewriting the HOST header is only possible with the enterprise plan to prevent abuse of 3rd-party services.
Fortunately I’ve found a thread on StackExchange, the feature I’m looking for is called Resolve Override, not Rewrite Host Header.
However, even without rewriting the Host header, Resolve Override is also only available in Enterprise plan.
@matteo mentioned using Cloudflare Workers, which could be interesting… But needs to mention that this also adds additional programming overhead on top of the Workers pricing, and competes with other alternatives from AWS and other cloud providers.