资源大湿 发表于 2017-3-2 18:15

永久开启Mac上chrome跨域问题

方法一open -a "Google Chrome" --args --disable-web-security方法二(永久方法)
1.打开 Terminal 进入终端状态,默认的提示符应该是 $;2.进入 Chrome.app 目录;
$ cd "/Applications/Google Chrome.app/Contents/MacOS/"
3.将原先的启动脚本改个名字;
$ sudo mv "Google Chrome" Google.real
4.使用管道操作创建新的启动脚本,注意其中加入你所需要的启动参数,这里的例子是启用内置的 Flash;

sudo printf '#!/bin/bash\ncd "/Applications/Google Chrome.app/Contents/MacOS"\n"/Applications/Google Chrome.app/Contents/MacOS/Google.real" --disable-web-security "$@"\n' > Google\ Chrome
5.给新的脚本加上运行权限; 
$ sudo chmod u+x "Google Chrome"

心弦VS琴弦 发表于 2017-4-11 18:52

很不错

ch_01 发表于 2017-4-11 19:10

楼主是超人

wys1988725 发表于 2017-4-11 18:35

好帖就是要顶

fhk20032003 发表于 2017-4-11 18:16

顶顶多好

光棍一辈子 发表于 2017-4-11 18:46

很好哦

小强爱虫虫 发表于 2017-4-21 10:03

楼主是超人

liangkin 发表于 2017-4-21 10:55

好帖就是要顶

zhangwb818 发表于 2017-4-21 10:17

真心顶

lolexlin 发表于 2017-4-21 10:05

很好哦
页: [1] 2 3 4 5 6
查看完整版本: 永久开启Mac上chrome跨域问题