禁用浏览器的同源策略 [英] Disable same origin policy in Chrome

查看:1213
本文介绍了禁用浏览器的同源策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来禁用谷歌的的同源策略:// EN。 wikipedia.org/wiki/Google_Chrome">Chrome 浏览器?

Is there a way to disable the same origin policy on Google's Chrome browser?

这是严格的发展,而不是生产,使用。

This is strictly for development, not production, use.

推荐答案

关闭铬(或铬),并重新启动与 - 禁用 - 网络安全参数。我只是测试这一点,证实我可以访问一个iframe的内容与SRC =htt​​p://google.com嵌入在从服务页面本地主机(下铬5 / Ubuntu的测试)。对我来说,确切的命令是:

Close chrome (or chromium) and restart with the --disable-web-security argument. I just tested this and verified that I can access the contents of an iframe with src="http://google.com" embedded in a page served from "localhost" (tested under chromium 5 / ubuntu). For me the exact command was:

chromium-browser --disable-web-security

从铬源:

// Don't enforce the same-origin policy. (Used by people testing their sites.)
const wchar_t kDisableWebSecurity[] = L"disable-web-security";

这篇关于禁用浏览器的同源策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆