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

600
Views
Error React Proxy error: Could not proxy request

Why do I got this error:

Proxy error: Could not proxy request /api/v1/management/me from localhost:3000 to http://localhost:8080 (ECONNREFUSED).

Got this axios setting:

axios.defaults.baseURL = "http://localhost:3000/";

And set this in package.json:

"proxy": "http://localhost:8080"

tried also:

"proxy": "http://localhost:8080/"

And have following call:

axios({
  method: "get",
  url: "api/v1/management/me",
  data: {},
  headers: { crossDomain: true },
})

When I call directly http://localhost:8080/api/v1/management/me I got response from server.

I have following backend, Vapor route setting. Maybe something wrong / specific here?

let protectedAPIRouter = authSessionRouter.grouped("api/v1").grouped(User.guardAuthMiddleware())
let managementAPIRouter = protectedAPIRouter.grouped("management")
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I would suggest the following solutions:

  1. Try to change localhost to IP address: "proxy": "http://your_IP_address:8080"
  2. Try this construction also:
"proxy": {
    "/api/*":  {
      "target": "http://localhost:8080",
      "secure": false
    }
  }
about 4 years ago · Juan Pablo Isaza Report
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!