一、该问题的重现步骤是什么?
1. saber 打包后的 dist目录 ,上传到 nginx下到 html目录 ,前端对应的域名是 https://illegal-test-web.yunchuangdao.com/
2. 后端bladex-boot,已经发布启动成功, 对应域名是 https://illegal-test.yunchuangdao.com/
3. 打开首页,no handler found for get /api/blade-auth/oauth/captcha 报错,验证码没有出现
二、你期待的结果是什么?实际看到的又是什么?
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
-- Springblade v3.0.3版本
Linux CentOS 8.0
四、请提供详细的错误堆栈信息,这很重要。
chunk-vendors.ad7a7464.js:8 GET https://illegal-test-web.yunchuangdao.com/blade-system/tenant/info?domain=https:%2F%2Fillegal-test-web.yunchuangdao.com 404 (Not Found)
chunk-vendors.ad7a7464.js:8 GET https://illegal-test-web.yunchuangdao.com/blade-auth/captcha 404 (Not Found)
五、若有更多详细信息,请在下面提供。
解决方案:
先到 Saber 项目中 ,在vue.config.js中,将devServer配置项给注释掉,再重新 yarn run build打包,重新发包到服务器
在服务器Saber对应的nginx 的 .conf文件中,加上配置:
location ^~/api {
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://illegal-test.yunchuangdao.com; # 这里网址对应是你的后台网关地址
}
扫一扫访问 Blade技术社区 移动端