美文网首页
跨域问题

跨域问题

作者: 请你吃糖 | 来源:发表于2017-06-25 14:32 被阅读39次

本地调试应用的时候,经常会遇到跨域的问题,下面给出针对chrome浏览器的解决方案,通过命令行来执行:

mac

chrome49以前版本

open -a "Google Chrome" --args --disable-web-security

chrome49以后版本

open -a /Applications/Google\ Chrome.app --args --disable-web-security --user-data-dir

Safari

open -a '/Applications/Safari.app' --args --disable-web-security

Window:

chrome.exe --disable-web-security

Mac-->Chrome如果命令行不成功可以安装一个插件Allow-Control-Allow-Origin

相关文章

网友评论

      本文标题:跨域问题

      本文链接:https://www.haomeiwen.com/subject/hmfrcxtx.html