Proxy error: Could not proxy request /oss/login from 192.168.1.8:8081 to

created at 01-14-2022 views: 4

problem

Running the vue project reports an error:

Proxy error: Could not proxy request /oss/login from 192.168.1.8:8081 to http://172.10.8.219:8089/cycling. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information ( ETIMEDOUT).

solution

  1. Find the vue.config.js file
  2. Modify target
proxy: {
         '/': {
             //target:'http://172.10.8.219:55....',
             target: 'http://localhost:8081', **change this to the local address**
             changeOrigin: true,
             pathRewrite: {
                 '^/': '/'
             },
             timeout: 60000 * 60 * 2 * 2
         }
Vue
Please log in to leave a comment.