Private networking - React and FastAPI

Hey. I've read the docs and am still slightly confused. How do I go about making calls from my public React app to my private FastAPI backend. https://docs.railway.app/reference/private-networking Frontend Service ID - 025f778e-723c-45ae-844c-f18fab993162 Backend Service ID - 29800e78-3c36-43a7-99b3-823055a3d0b4
Solution:
then I'm sorry but you have the wrong idea, your backend needs to be public
Jump to solution
8 Replies
Percy
Percy•17mo ago
Project ID: 025f778e-723c-45ae-844c-f18fab993162,29800e78-3c36-43a7-99b3-823055a3d0b4
Brody
Brody•17mo ago
is this a client side rendered react app?
squidwarddab1111
squidwarddab1111OP•17mo ago
Yes it is
Solution
Brody
Brody•17mo ago
then I'm sorry but you have the wrong idea, your backend needs to be public
squidwarddab1111
squidwarddab1111OP•17mo ago
Ah ok thanks Brody, not a problem on backend being public. Question, is there a built-in way to allow my backend service to filter out requests that are not coming from my React app?
Brody
Brody•17mo ago
that would need to be done with cors headers set by your app
squidwarddab1111
squidwarddab1111OP•17mo ago
Ok will do. That is all the questions I have right now. Once again, thank you very much for the speedy response
Brody
Brody•17mo ago
no problem 🙂
Want results from more Discord servers?
Add your server