-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
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
部署之后还是请求本地API #5795
Comments
@afc163 恩,我还是不知道怎么解决。 |
对于前端同学来说这个确实不好理解,解决方法是服务端需要设置,关键点如下,以我们为例。 更多请参考部署到不同的平台
proxy_pass设置成真实服务器地址就可以了。 很多回答都是让你去看文档(对于做前端的同学真的摸不着头脑),而不直接告诉你解决问题的方法,真的不太好,如果解决了你的问题给个👍,看看解决了多少人的问题。 这样才是回答问题。如果之前的回答指出关键点,这个问题还会被一遍又一遍提问吗? |
@Liqiankun 欢迎来帮我们完善文档。 |
@afc163 一点个人意见而已。😂 |
Hi 朋友不好意思打扰你,我现在也碰到了这个问题试了很多不知道怎么解决。想请教一下你,你这里说要改的proxy_pass我没有在项目里找到,请问你是先用nginx部署,才会出来这个文件吗?(我目前改了config.js里的proxy,但还是无法连接服务器) |
@ZidiHu 这个文件和我们前端的项目没关系,这个让后台同学看一下就应该可以解决问题了。 |
💻 示例代码
config文件配置
build之后部署错误如下。
部署之后请求为啥不是我target设置的地址?怎么设置才能访问我设置的地址?
The text was updated successfully, but these errors were encountered: