Is there a way to disable the same origin policy on Google's Chrome browser? This is strictly for development, not production, use.
A:
Probably not.
I use the URL rewriting features of Charles Proxy to map remote HTTP APIs to URLs that appear to point to my development server when I need to do that kind of thing.
David Dorward
2010-06-23 15:04:09
A:
Answered in http://stackoverflow.com/questions/330427/can-i-disable-sop-same-origin-policy-on-any-browser-for-development.
1st result for Google: disable same origin policy
.
mcandre
2010-06-23 15:07:38
There are no accepted answers. The others range from "Write a proxy", to Firefox and IE specific answers, to a link to a section of a page on Wikipedia (a section that no longer exists!), to redirecting an entire port (which wouldn't solve any Same Origin problem since it still only lets you access one server at a time). It's all very well linking to the first hit on Google that looks reasonable … but try to make sure it actually answers the question.
David Dorward
2010-06-24 08:37:21
"try starting Chrome with the argument --disable-web-security"
mcandre
2010-06-24 19:28:58
+2
A:
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
From the chromium source:
// Don't enforce the same-origin policy. (Used by people testing their sites.)
const wchar_t kDisableWebSecurity[] = L"disable-web-security";
no
2010-07-05 07:20:32