-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[vue] vue-cli怎么解决跨域的问题? #487
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
Comments
dev > 代理 devServer.proxy |
axios 设置代理 |
vue-cli 主要在本地通过本地服务器拦截转发请求的模式解决跨域问题。 步骤:
跨域问题,除了单机修改浏览器配置外,都是服务器端配合进行解决。 |
在根目录下新建:vue.config.js注意名不能错误,然后里面配置 |
vue-cli无法解决跨域问题。真正解决跨域问的是webpack。只不过vue-cli3.0将webpack的配置继承到了vue.config.js中,才给初学者造成了vue-cli可以解决跨域的错觉。 |
[vue] vue-cli怎么解决跨域的问题?
The text was updated successfully, but these errors were encountered: