Two Origin servers one just for API

Hello, I cant seem to figure out how to do this like i would on my own nginx server…

(no redirects, just reverse proxy the two different servers, all api requests go to server 1.1.1.1 all web requests go to server 2.2.2.2)

https://mydomain.com -----------[cloudflare]-----{mydomain.com/api?stuff}----1.1.1.1 server
                                     |_______{mydomain.com/everything_else----2.2.2.2 server

in nginx i would simply have two different location blocks one proxy_pass to 1.1.1.1 matching the url path and a second location proxy_pass to 2.2.2.2 that / everything else… but i want this split to happen on Cloudflare before the traffic ever gets to my nginx servers…

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