React子应用,本地开发通过proxy访问后台,在主应用proxy无法工作 #3038
Unanswered
JinHe-PerkinElmer
asked this question in
Q&A
Replies: 1 comment
-
可以写浏览器插件获取到代理 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What happens?
React子应用配置了proxy,本地开发可以访问后台接口:
这在子应用内如是正常工作的,但是把子应用集成到主应用的时候,api调用就不行了。
例如获取user detail接口在子应用8000端口
GET http://localhost:8000/api/v1/user/detail
正常返回user 信息;
但是在主应用3000端口返回的是主应用的HTML
相关环境信息
补充
目前没有找到解决方案,希望可以提供一些帮助,谢谢(刚接触微前端,研究过single-spa,使用起来很费劲,所以想试试qiankun)。
Beta Was this translation helpful? Give feedback.
All reactions