Internal URL - issue/question

I am trying to use an internal URL inside of my reactapp to connect to a strapi instance.. I made a 'picture' showing the two scenarios and the output.. Unsure what I can do differently
No description
Solution:
your frontend should be directly calling the public domain of the graphql server. fun fact, this is exactly how railway's dashboard works. what you're doing is security through obscurity, and that's not inherently secure, it's just going to make development harder on yourself....
Jump to solution
5 Replies
Percy
Percy3mo ago
Project ID: 4192a00e-89d7-4e81-be01-005041c8e063
gitago_texts
gitago_textsOP3mo ago
4192a00e-89d7-4e81-be01-005041c8e063
Brody
Brody3mo ago
you need to use the public domain when calling the backend via the frontend please read this docs section - https://docs.railway.app/guides/private-networking#private-network-context
gitago_texts
gitago_textsOP3mo ago
Gotcha.. So is it not possible to fetch from the 'server' side using the internal url?
mind you I may be defining 'server' wrongly when I say this.. so by this i mean my express.js backend that is listening for a fetch from the frontend to reach out to graphql and get the data and then send it back over to the front.. if i can help it Im trying to be as 'secure' as possible so I can learn the proper way and figured that using an 'internal' url would be going down the right road...
Solution
Brody
Brody3mo ago
your frontend should be directly calling the public domain of the graphql server. fun fact, this is exactly how railway's dashboard works. what you're doing is security through obscurity, and that's not inherently secure, it's just going to make development harder on yourself.
Want results from more Discord servers?
Add your server