Private ip api usage
Hello, as i deployed my frontend and backend
when i remote terminal i noticed that are a private ip for each container
when i tried to ping the api private ip from web terminal it worked and pinged
i wondered if i can use it as my api url to not expose it to public and only works on my website
is it possible?
7 Replies
that depends on how your frontend communicates with your backend.. if it's directly through the REST API, this is obvisouly not going to work, because it's your browser that's making the API calls
any method that could make this work ?
if your frontend is not static, ie. it's some Node.js with SSR and user only receives the compiled html, you can internally simply use api's hostname, don't even need to use api addresses
its not static it fetches from api
but there are client components
yes, but does it fetch internally, or you can see the requests in browser's network tab?
yes i see them on the browser
yea yea i got it know
then it has to be public, because it's not the zerops container making those requests but your browser / your home internet