How do reverse proxy my API and client urls?
Hello everyone, I use react for one of my sites and express on the backend and basically the client connects to the backend which is on a different subdomain.
I wanna use cloudflare as a reverse proxy to connect both, as so many people told me that I should use one of it's feature but no one ever told me how.
so I'm asking you, what should I do to connect my backend and frontend in the same url?
3 Replies
Shouldn't the front end get stuff from the backend directly?
I'm not sure what you mean
it does get stuff from the backend but they are different origin which is not ideal
Different origin?
In my understanding, the frontend app, if it needs something from teh backend, should make the request directly from the backend. So the backend only needs to be open from requests from the frontend app, and not from the client.