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 ?

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

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 ?

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.

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