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... create a Chrome shortcut on your desktop.
Right-click > properties > Shortcut
Edit "target" path :
(Change the 'C:....\chrome.exe' to where ever your chrome is located).
et voilà :)
Don't do this! You're opening your accounts to attacks. Once you do this any 3rd party site can start issuing requests to other websites, sites that you are logged into.
Instead run a local server. It's as easy as opening a shell/terminal/commandline and typing
Then pointing your browser to
If you find it's too slow consider this solution
Yep. For OSX, open Terminal and run:
--user-data-dir required on Chrome 49+ on OSX
For Linux run:
Also if you're trying to access local files for dev purposes like AJAX or JSON, you can use this flag too.
For Windows go into the command prompt and go into the folder where Chrome.exe is and type
That should disable the same origin policy and allow you to access local files.
Update: For Chrome 22+ you will be presented with an error message that says:
However you can just ignore that message while developing.
FOR MAC USER ONLY
For Windows:
Execute the following command:
For Mac:
Execute the following command:
A new web security disabled chrome browser should open with the following message:
If you are using Google Chrome on Linux, following command works.