-
vue.config.js配置如下
devServer: { proxy: { '.action': { target: 'http://xxx.xxx.net', // 接口的域名 changeOrigin: true } } }
-
请求如下
this.axios.post('/user/login.action',{ CompanyName, UserPass, UserName })
-
报错如下
Proxy error: Could not proxy request /user/login.action from localhost:8080 to http://xxx.xxx.net. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ETIMEDOUT).
- postman能调通 求问是什么问题
'.action':
这个地方写成正则表达式