Reverse proxy based on a path

I would like to reverse proxy based on a path, for example

https://app.example.com/api → will point to https://api.example.com

This will help me avoiding OPTIONS request, as both the frontend and backend will be served from same origin.

Is there any inbuilt way in Cloudflare to acheive this ?

1 Like

Yes, there is. It’s called Page Rules.

https://support.cloudflare.com/hc/en-us/articles/218411427-Understanding-and-Configuring-Cloudflare-Page-Rules-Page-Rules-Tutorial-

1 Like

Thanks, but i think that particular rule (Resolve Override) is only available in enterprise account.

Is there any other options which is available for Free / Pro / Business account ?

1 Like

Do you really need to redirect requests to this folder to a different IP address (which is called ‘resolve overide’) rather than your hostname api.example.com? :thinking:

If the answer is ‘no’, try a page rule. :wink:

If yes, you’d need to configure a (reverse) proxy on your server.

1 Like

This topic was automatically closed after 31 days. New replies are no longer allowed.