Why has requestURL not changed since proxyTable configuration?

proxyTable: {
  "/levy": {
    target: "http://118.31.112.11",
    changeOrigin: true //
  }
},

 var obj = {
      username:"",
      password:""
}

this.$post("/levy/login/index",obj).then(res=>{
      console.log(res);
})

Why doesn"t requestUrl take effect after the configuration above? Causes an error to be reported
clipboard.png

it"s not a port problem. It doesn"t work even if you change it to 8060.

After setting

proxyTable, you can't see it from the requestUrl of the interface, and the error is caused by a problem with the backend interface. If you want requestUrl to display the proxy address instead of using proxyTable, you can try to use the baseURL setting of axios to see that the proxy address will not change after the configuration


. It's just that the nodejs service proxies for you.

Menu