Disable-web-security in Chrome 48+

前端 未结 13 2396
遇见更好的自我
遇见更好的自我 2020-11-27 10:33

I have a problem with the --disable-web-security flag. It is not working in Chrome 48 and Chrome 49 beta on Windows.

I\'ve tried killing all of the inst

相关标签:
13条回答
  • 2020-11-27 10:58

    In a terminal put these:

    cd C:\Program Files (x86)\Google\Chrome\Application
    
    chrome.exe --disable-web-security --user-data-dir="c:/chromedev"
    
    0 讨论(0)
  • 2020-11-27 10:59

    Install This Chrome-plugin for Disable-web-security in Chrome::

    " Allow-Control-Allow-Origin: * " link Here or you can google above plugin if you want.

    it is very easy to enable and disable the security with this plugin.

    0 讨论(0)
  • 2020-11-27 10:59

    For Mac, using Safari is a good alternate option for local development purpose and the feature is built into the browser (so no need to add browser extension or launch Chrome using bash command like [open -a Google\ Chrome --args --disable-web-security --user-data-dir=""].

    To disable cross origin restriction using Safari (v11+): From menu click “Develop > Disable Cross Origin Restriction”.

    This does not require relaunching the browser and since its a toggle you can easily switch to secure mode.

    0 讨论(0)
  • 2020-11-27 11:07

    I'm seeing the same thing. A quick google found this question and a bug on the chromium forums. It seems that the --user-data-dir flag is now required. Edit to add user-data-dir guide

    0 讨论(0)
  • 2020-11-27 11:07

    Mac OS:

    open -a Google\ Chrome --args --disable-web-security --user-data-dir=

    UPD: add = to --user-data-dir because newer chrome versions require it in order to work

    0 讨论(0)
  • 2020-11-27 11:09

    As of the date of this answer (March 2020) there is a plugin for chrome called CORS unblock that allows you to skip that browser policy. The 'same origin policy' is an important security feature of browsers. Please only install this plugin for development or testing purposes. Do not promote its installation in end client browsers because you compromise the security of users and the chrome community will be forced to remove this plugin from the store.

    0 讨论(0)
提交回复
热议问题