Is there any way to disable the Same-origin policy on Google's Chrome browser?
This is strictly for development, not production use.
Is there any way to disable the Same-origin policy on Google's Chrome browser?
This is strictly for development, not production use.
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:Note : Kill all chrome instances before running command
The browser will warn you that "you are using an unsupported command line" when it first opens, which you can ignore.
From the chromium source:
Before Chrome 48, you could just use:
For Windows:
(using windows 8.1, chrome 44.0)
First, close google chrome.
Then, open command prompt and go to the folder where 'chrome.exe' is.
So I type:
cd C:\Program Files (x86)\Google\Chrome\Application
)now type:
chrome.exe --disable-web-security
a new window of chrome will open.