前端跨域问题
程序员文章站
2024-02-21 22:25:22
...
JavaScript出于安全方面的考虑,不允许跨域调用其他页面的对象。但在安全限制的同时也给注入iframe或是ajax应用上带来了不少麻烦。
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
- 1
Window:
chrome.exe --disable-web-security
- 1
PS:Mac–>Chrome如果命令行不成功可以安装一个插件Allow-Control-Allow-Origin
上一篇: 了解Java线程池创建过程
下一篇: 计算机网络的应用层