Disable Web Security not working


I am trying to add the disable web security flag to the chrome driver to help with a CORS issue I am running into. I am modifying this line and doing a build. I tried putting --disable-web-security and disable-web-security and neither worked. I also tried removing the safe parameter, that also did not work. Am I trying to edit the correct parameters or is there another location for the chrome parameters?

I am getting this error when I am testing.

Uncaught SecurityError: Failed to set the 'cookie' property on 'Document': The document is sandboxed and lacks the 'allow-same-origin' flag.


Are you trying to set the cookie from a local file? Chrome cannot by default set cookies for a local file. According to this StackOverflow post, you should set the --enable-file-cookies flag.


@olmokramer I am trying to get this site to work as my test. The IFRAME "b" is the one I want to get working. Basically I am trying to get D&D to work from other domain’s with or without sandbox attributes.

Also I set the --enable-file-cookies flag and still got that same error.

I tested in chrome with the --disable-web-security flag and iframe "B" works as expected.


I found out the line I was modifying in the start-atom.coffee was part of the spec runner tasks. Instead I should be modifying the src\browser\main.coffee on this line, but adding the --disable-web-security and --enable-fie-cookies does not work, and yes I added them to the object at this line .


So with help from this issue I added 'web-security': false to this line. After doing a build the drag and drop worked as expected.

Proxy http requests as file://someURL to localhost:8080:/someURL to avoid CORS issues