100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > proxy代理报错: Uncaught (in promise) Error: Request failed with status code 500

proxy代理报错: Uncaught (in promise) Error: Request failed with status code 500

时间:2018-10-26 23:20:19

相关推荐

proxy代理报错: Uncaught (in promise) Error: Request failed with status code 500

POST http://localhost:8013/check/login 500 (Internal Server Error)createError.js:16 Uncaught (in promise) Error: Request failed with status code 500at createError (createError.js:16)at settle (settle.js:18)at XMLHttpRequest.handleLoad (xhr.js:59)

今天登陆vue的项目的时候

发现了这样的一个报错

怎么也登录不上

仔细检查了一下自己写的代码

发现问题所在

在配置代理的时候比较粗心

将VUE_APP_WS_API里面的链接写错了

应该在前面加上一个http://

不然无法使用proxy代理

修改之后的文件.env.development

ENV = 'development'# 接口地址#VUE_APP_BASE_API = '/'VUE_APP_WS_API = 'http://192.168.4.103:8091/'# 是否启用 babel-plugin-dynamic-import-node插件VUE_CLI_BABEL_TRANSPILE_MODULES = true

重新启动,恢复正常

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。