35

The command --disable-web-security to allow for cross domain requests on Chrome is no longer working, I presume due to the latest update.

Is there a workaround for this, besides downloading an older version of chrome and disabling updates?

Might as well ask in the same question, the javascript snippet suggested to turn off web security in Firefox never works for me:

try {
    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
} catch (e) {
    alert("UniversalBrowserRead failed");
}

The page always alerts UniversalBrowserRead failed.

3
  • 1
    Which version of Chrome? I think I've run this with latest on Windows and it works. Commented Aug 28, 2011 at 19:39
  • 1
    I thought i had the same problem. It turned out chrome was still running in the systray and running the command just created a new window with the previous command line switches. Make sure you kill all chrome instances first, or the command line switches won't have any effect. Commented Nov 9, 2011 at 11:55
  • Install either chromium or chrome canary to have two different installs of chrome on one machine, one with security disabled for development work, the other with security enabled for daily browsing. Commented Dec 16, 2014 at 20:56

4 Answers 4

23

Kill all instances and try again. Had the same problem today and after I killed chrome it works.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks! It worked with the latest Chrome (23.0.1271.97 m) after I shut all instances down and then ran the command. You will know it works because it says "You are using an unsupported command-line flag: --disable-web-security. Stability and security will suffer." "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security
Thanks, the flag wasn't working for us either until we opened the Task Manager and noticed that we had 4 zombie Chrome processes running in the background. Killing them all and restarting Chrome fixed the issue. Great job!
Yeah, definitely Google Hangouts was running on system tray. After going to Task Manager and kill all chrome processes, cross domain requests are now possible
@CameronTaggart So the warning about the "unsupported command-line flag" is actually an indication that the command-line flag is working?
6

Open the task manager in your laptop or computer and try to kill all the existing chrome* instances in you system and run the shortcut with "\Google\Chrome\Application\chrome.exe --disable-web-security"

It always resets when you restart the laptop or computer so, you may need to do this step when you re-start the system.

2 Comments

How to enable that back (the disabled web security) ? Does it resets even after restarting the Chrome and without restarting the system ?
If you want to return normal web security, you need to close Chrome and then start it again without the --disable-web-security flag
5

extend disable web security command with --user-data-dir. This worked for me, more details are on >https://bugs.chromium.org/p/chromium/issues/detail?id=575690

Command I use in windows :

"C:\Users\Public\Desktop\Google Chrome.lnk" --disable-web-security  --user-data-dir

Comments

0

This worked for me given that It was flutter causing the error:

1. Go to *flutter\bin\cache* and remove a file named: *flutter_tools.stamp*

2. Go to *flutter\packages\flutter_tools\lib\src\web* and open the file *chrome.dart*.
    
3. Find '--disable-extensions'
    
4. Remove line '--disable-web-security' (if it exists, otherwise step 1 is sufficient

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.