- 101
- 0
最近在用vue+express+mongodb搭建项目,服务器这边是搭好了,但在前端请求的时候报服务器端错误504
我直接访问127.0.0.1:3000都能获取数据;
服务器报错:[HPM] Error occurred while trying to proxy request /goods from 127.0.0.1:8080 to http://127.0.0.1:3000/goods
这是index.js代理配置:
proxyTable: {
'/goods': {
target:'http://127.0.0.1:3000/goods',
changeOrigin:true,
pathRewrite:{
'^goods':''
}
}
}
这是前端请求:
http:function () {
this.$axios.get('/goods').then((req,res)=>{
let data = res.data;
if(data.status === "0"){
this.usurInfo = data.result;
}else {
this.usurInfo = [];
}
})
} - 共 0 条
- 全部回答
-
低吟ぃ浅唱 普通会员 1楼
The error message "Error occurred while trying to proxy request" typically indicates that there is an issue with the proxy settings or the proxy server itself. Here are some possible causes and solutions:
-
Proxy settings: Make sure that you have correctly configured the proxy settings in your browser. Check that the proxy server name, port number, and protocol are correct. Also, ensure that you have enabled proxy support in your browser.
-
Proxy server issues: Check if the proxy server is up and running. If it is down, try accessing the website again later. If it is still down, you may need to contact the proxy server administrator for assistance.
-
Firewall settings: Check if your firewall is blocking requests to the proxy server. If it is, temporarily disable it to see if the error goes away.
-
Clear browser cache: Clearing the browser cache can sometimes resolve proxy-related issues. Try reloading the browser.
-
Update browser: Make sure that your browser is up to date with the latest security patches and features.
If none of the above solutions work, you may need to contact the support team of the website you are trying to access for further assistance.
-
- 扫一扫访问手机版
回答动态

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器更新之后。服务器里面有部分玩家要重新创建角色是怎么回事啊?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题函数计算不同地域的是不能用内网吧?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题ARMS可以创建多个应用嘛?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题在ARMS如何申请加入公测呀?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题前端小程序接入这个arms具体是如何接入监控的,这个init方法在哪里进行添加?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器刚到期,是不是就不能再导出存档了呢?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器的游戏版本不兼容 尝试更新怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器服务器升级以后 就链接不上了,怎么办?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器转移以后服务器进不去了,怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器修改参数后游戏进入不了,是什么情况?预计能赚取 0积分收益
- 回到顶部
- 回到顶部

