I am using a load balancer and have several django projects running behind the load balancer. Therefore, the IP address of the axios.post and axios.get should be different depending on the local machine IP address in where the Django project is running.
The below works fine for using it on a single machine
I have a .env file with
REACT_APP_AXIOS_URL=http://127.0.0.1
console.log(process.env.REACT_APP_AXIOS_URL)
axios.post(`${process.env.REACT_APP_AXIOS_URL}`)
However, I would like that REACT_APP_AXIOS_URL to be fetched automatically instead of hardcoding it since there will be 10 machines behind the load balancer. How can I do that?