Set different domain for public domain and fucntions API

I have a site on cloudflare pages using pages functions. the functions also acts like an rest Api validating through API or Sessions. My question now is how I can make the domain on the public for cloudflare pages app.mydomain.com and then the functions acting as API can be api.mydomain.com currently all are on mydomain.com so mydomain.com is for the main site and mydomain.com/apiendpoint is for the Api Trying to separate it, if possible 🙏
4 Replies
z0rrn
z0rrn8mo ago
You need to set up a second pages project.
Manuel Ogomigo
Manuel OgomigoOP8mo ago
oh okay got it, that will be just for the API right?
z0rrn
z0rrn8mo ago
Yes, exactly. One for the API and one for the App.
Manuel Ogomigo
Manuel OgomigoOP8mo ago
Thank you!
Want results from more Discord servers?
Add your server