We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我按照楼主的步骤,在本地启动 后端及 前端
本机部署及启动后端工程,浏览器访问 http://localhost:8080/tumo 成功;
本机部署前端,http://localhost:9528/ 可以打开,但是访问 文章列表失败; 经过排查,发现问题是跨域访问导致,在vue.config.js 的跨域配置少了部分内容:
proxy: { '/api': { target: 'http://localhost:8080/', ws: true,
//少了下面部分,导致加了/api 后,无法找到对应的后台接口 changeOrigin: true, pathRewrite: { // ^代表字符串开头,实际发送请求时,会把请求开头的/demo删除 // 因为/demo并不是请求的一部分,只是个代理的标识 "^/api": "" }
} }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我按照楼主的步骤,在本地启动 后端及 前端
本机部署及启动后端工程,浏览器访问 http://localhost:8080/tumo 成功;
本机部署前端,http://localhost:9528/ 可以打开,但是访问 文章列表失败;
经过排查,发现问题是跨域访问导致,在vue.config.js 的跨域配置少了部分内容:
proxy: {
'/api': {
target: 'http://localhost:8080/',
ws: true,
}
}
The text was updated successfully, but these errors were encountered: