Proxy error: Could not proxy request

created at 09-01-2021 views: 1

After the vue project is started, the following error is reported when logging in:

Proxy error: Could not proxy request from xxx to xxx

There is a problem with the proxy server. It may be that the currently configured proxy server is turned off or configured incorrectly. In the vue.config.js file, change the target to the correct server address that has been turned on. Click the server)

proxy: {
  // Proxy server settings
  '/my_test_proxy': {
    target: 'xxx:xxx', // Need to proxy the current address to the target
    changeOrigin: true,
    pathRewrite: {
      ['^' + '/my_test_proxy']: '' // Rewrite'/my_test_proxy' as ''
    }
  }
}
Please log in to leave a comment.