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
You need to set up a second pages project.
oh okay got it, that will be just for the API right?
Yes, exactly. One for the API and one for the App.
Thank you!