Mozak
Mozak

Reputation: 2798

Unable to start chrome in non secure mode?

I am trying to debug an application but it throws same origin policy error.

So I followed ticket Disable same origin policy in Chrome

However when ever I start chrome with CC:\Program Files\Google\Chrome\Application\chrome.exe" --args --disable-web-security from cmd, it is not starting in non-secure mode and it also doesn't show a notification that says that chrome is running in non secure mode.

I have disabled all the extensions too for this.

Please help.

Upvotes: 2

Views: 5495

Answers (3)

frisco
frisco

Reputation: 1917

You don't need --args to use --disable-web-security but it seems that since Chrome 38 even enabling that parameter does not allow CORS without the proper header.

See: https://code.google.com/p/chromium/issues/detail?id=392170

Upvotes: 0

cvigo
cvigo

Reputation: 415

It seems that --disable-web-security is not supported anymore...

Chromium 38 says (translated from spanish) "--disable-web-security option is not accepted because it affects security and stability" :-(

Error displayed

Upvotes: 1

Rob W
Rob W

Reputation: 349012

Remove --args, start Chrome or Chromium as follows:

"C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-web-security

This flag is quite dangerous, I suggest to start up a separate profile to avoid leaking confidential information from one website to another:

"C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir=%TMP%\profiledirname

And if you want to load an unpacked extension, use the --load-extension flag (multiple extensions can be loaded by separating the paths by a comma):

"C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir=%TMP%\profiledirname --load-extension="C:\Users\My User\Documents\My extension"

Upvotes: 3

Related Questions