1
votes

when I run npm run start, I get

start": "vue-cli-service serve"

and then I use http request, but I get

Proxy error: Could not proxy request /crm/api/boss/admin/doLogin from localhost:8080 to https://qa6boss.qjdchina.com. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (EPROTO).

What is the reason of this behavior?

2

2 Answers

1
votes
'^/api': { 
   target: 'http://localhost:3000', 
   changeOrigin: true, enter code here
   secure: false, 
   pathRewrite: {
     '^/api': '/api'
   }, 
   headers: {
     Connection: 'keep-alive'
   }
 },

-1
votes

Try to add pathRewrite e.g.:

'^/api': { 
  target: 'http://localhost:3000', 
  changeOrigin: true, 
  secure: false, 
  pathRewrite: {
    '^/api': '/api'
  }, 
  logLevel: 'debug' 
},