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.
For Windows users:
The problem with the solution accepted here, in my opinion is that if you already have Chrome open and try to run this it won't work.
However, when researching this, I came across a post on Super User, Is it possible to run Chrome with and without web security at the same time?.
Basically, by running the following command (or creating a shortcut with it and opening Chrome through that)
you can open a new "insecure" instance of Chrome at the same time as you keep your other "secure" browser instances open and working as normal. Important: delete/clear
C:/Chrome dev session
folder every time when you open a window as second time--disable-web-security
is not going to work. So you cannot save your changes and then open it again as a second insecure instance of Chrome with--disable-web-security
.Following on Ola Karlsson answer, indeed the best way would be to open the unsafe Chrome in a different session. This way you don't need to worry about closing all of the currently opened tabs, and also can continue to surf the web securely with the original Chrome session.
These batch files should just work for you on Windows.
Put it in a Chrome_CORS.bat file for easy use
This one is for Chrome Canary. Canary_CORS.bat
You can simply use this chrome extension Allow-Control-Allow-Origin
just click the icon of the extensnion to turn enable cross-resource sharing ON or OFF as you want
On Linux- Ubuntu, to run simultaneously a normal session and an unsafe session run the following command:
For windows users with Chrome Version 60.0.3112.78. You do not need to close any chrome instance.
BEWARE NOT TO USE THIS PARTICULAR BROWSER INSTANCE FOR BROWSING BECAUSE YOU CAN BE HACKED WITH IT!
There is a Chrome extension called CORS Toggle.
Click here to access it and add it to Chrome.
After adding it, toggle it to the on position to allow cross-domain requests.