10 months ago
Hello,
I've got an application combined from 3 services: MySQL database, Java backend and React frontend. Requests and responses between backend and frontend are sent via private network and access to the app is provided via public networking option (the one available in services settings tab). When I launch app I'm able to open it in a browser but when it comes to reach the page where data is fetched from backend I got below:
Mixed Content: The page at 'https://... .up.railway.app/ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://... .railway.internal:8080/... This request has been blocked; the content must be served over HTTPS
I tried to make backend public and use public endpoints but when tried to set it in variables I got an info (orange icon with exclamation mark) that in such configuration additional fees might be charged. Is there a way to slove this? It sounds reasonable to me to have all the communication between backend and frontend in private network and reaching the app by user can be done via public domain.
Best regards,
Tomek
1 Replies
10 months ago
Hello,
You need to use the public domain when calling the backend.
A user's browser cannot call the private domain, it would not be a very private network if they could.
https://docs.railway.com/guides/private-networking#private-network-context
Best,
Brody
Status changed to Awaiting User Response Railway • 10 months ago
4 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 4 months ago