John Smith
John Smith

Reputation: 477

The `--disable-web-security` command is seems no longer working

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.

Upvotes: 34

Views: 68019

Answers (4)

Shifter
Shifter

Reputation: 1

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

Upvotes: 0

Sudhindra_Chausalkar
Sudhindra_Chausalkar

Reputation: 163

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

Upvotes: 5

Jaishankararam
Jaishankararam

Reputation: 301

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.

Upvotes: 6

arek
arek

Reputation: 1332

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

Upvotes: 23

Related Questions