美文网首页
如何处理Chrome 中CORS问题

如何处理Chrome 中CORS问题

作者: _TheSpecialOne | 来源:发表于2019-08-09 11:38 被阅读0次

    Windows

    Just do follow steps:

    • Right click on the desktop, add a new shortcut
    • Add the target as "[PATH_TO_CHROME]\chrome.exe" --disable-web-security -- -disable-gpu --user-data-dir=~/chromeTemp
    • Click OK.

    NOTE: On Windows 10 command will be: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp

    OSX

    open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security

    Linux

    google-chrome --disable-web-security

    If you need access to local files for dev purposes like AJAX or JSON, you can use -–allow-file-access-from-files flag.

    Remark

    Since Chrome 22+ you will get an error message that says:

    You are using an unsupported command-line flag: --disable-web-security. Stability and security will suffer.

    相关文章

      网友评论

          本文标题:如何处理Chrome 中CORS问题

          本文链接:https://www.haomeiwen.com/subject/bavcjctx.html