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

请教关于设置代理解决跨域的问题 #59

Open
RBqingkong opened this issue Aug 14, 2020 · 2 comments
Open

请教关于设置代理解决跨域的问题 #59

RBqingkong opened this issue Aug 14, 2020 · 2 comments

Comments

@RBqingkong
Copy link

系统环境为MAC
直接用 ykit s -p 4000 启动服务器,然后前端请求接口也是127.0.0.1:4000;
请教下怎么设置代理呢,我试过在ykit.config的 server 中加上 proxy: { '/api': { target: 'http://127.0.0.1:3000', changeOrigin: true } }
但是没有生效

@mieco
Copy link

mieco commented Apr 24, 2022

解决了吗

@RBqingkong
Copy link
Author

没有,后面用 npm run dev,前端后端都在本地启动;之前是因为想跟后端同事联调才提的这个,后面后端也是我在弄。。。

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