Tag Archives: Proxy error: Could not proxy request

Proxy error: Could not proxy request [How to Solve]

After the Vue project is started, the login reports the following error:

There is a problem with the proxy server. It may be that the currently configured proxy server is closed or incorrectly configured. In vue.config.js file, change the target to the correct opened server address (you can ask the back-end developer to start the server)

proxy: {
  // Proxy server settings
  '/my_test_proxy': {
    target: 'xxx:xxx', // Need to proxy the current address to target
    changeOrigin: true,
    pathRewrite: {
      ['^' + '/my_test_proxy']: '' // rewrite '/my_test_proxy' to ''
    }
  }
}

Proxy error: Could not proxy request

Detailed map traversal, teach you to master the complex gremlin query debugging method>>>

After the Vue project is started, log in and report an error:

Proxy error: Could not proxy request /user/login from localhost:8089 to http://***。**。**:8081/.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ENOTFOUND).

The error is very obvious. The agent can’t pass. You need to modify the agent configuration

Find vue.config.js, which contains the part of configuring agent, and change it to the correct back-end address

reference:

This article shares CSDN – three evils.