Can you forward certain requests from a Cloudflare Pages site to a different domain?

Hello! I'm looking to see if I could deploy a site using PayloadCMS with Cloudflare Pages. They have a backend accessible through routes starting with /api. Could I host my static frontend on Cloudfare Pages, but forward (or perhaps "transform" is the right word) all requests to /api to a server I would host elsewhere? In order to get cookies to work correctly, the site would have to appear to the web browser like it was on the same domain. 😕 Thanks for your help!
1 Reply
Epailes
Epailes•4mo ago
This might be a long shot, but were you building this? https://github.com/nemphi/hanabicms Came up when I was googling but it's not available anymore, curious how it went