Skip to content
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

开发模式下,vue的代理应该怎样配置 #1348

Open
AntarcticPresident opened this issue Sep 2, 2024 · 1 comment
Open

开发模式下,vue的代理应该怎样配置 #1348

AntarcticPresident opened this issue Sep 2, 2024 · 1 comment

Comments

@AntarcticPresident
Copy link

image
这里面localhost:3000是我基座的地址。

按我理解的,这个接口应该通过proxy代理到后端真正的地址。
1、后端真正的地址应该填什么?是后端前端的地址,还是后端的server地址。
2、vue.config.js应该怎么配置

  • 正常来讲,肯定是有多个子应用的,它们都要配代理,怎么区分?需要每个子应用给增加一个路由前缀?页面的路由,和接口的路由怎么区分

非常感谢~

@timhub66
Copy link
Member

timhub66 commented Sep 3, 2024

@AntarcticPresident ,服务端接口这里没太多讲究,确保所有后端接口对基座(localhost:3000)不跨域,能正常访问就行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants