Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
Automically set ip address of axios.post in react

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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!