2

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.

Community
  • 1
  • 1
Mozak
  • 2,388
  • 4
  • 28
  • 44

3 Answers3

3

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"

Rob W
  • 315,396
  • 71
  • 752
  • 644
  • Thanks Rob for your answer, however if I could add something: It seems that with my version of windows, the command that worked is: C:\"Program Files (x86)"\Google\Chrome\Application\chrome.exe --disable-web-security --user-data-dir=%TMP%\profiledirname (notice the quotes only around "Program files (x86)"), without the quotes, chrome either doesn't understand the flags, or will not launch. – Abdoul Sy Nov 17 '14 at 12:32
1

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

cvigo
  • 315
  • 2
  • 9
  • `--disable-web-security` is still implemented. That warning is only displayed to make users aware that this dangerous flag has been activated. If Chrome did not support it, or if the flag was not active, then no notifications are displayed at all. The actual warning is "You are using an unsupported command-line flag: --disable-web-security. Stability and security will suffer.". – Rob W Jul 08 '14 at 16:47
  • 1
    You are absolutely right @RobW. I switched to English to see the original wording of that warning, and concluded that the Spanish translation is crap and confusing: "Your are using an unsupported command-line flag" has nothing to do with "No se admite el indicador de línea de comandos" – cvigo Jul 10 '14 at 12:11
  • I tried with the answers posted, however none of them worked. It could be because I have an anti-virus protection extension for chrome. Had to install Chrome Canary for running it in non-secure mode. – Mozak Jul 21 '14 at 07:48
0

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

frisco
  • 1,867
  • 2
  • 20
  • 28