Creating Google Chrome shortcut with --disable-web-security

后端 未结 12 1294
南方客
南方客 2020-11-30 12:10

I am trying to access some local files via jqueryMobile, it works fine in Firefox and IE but Chrome gives a security exception. I can open Chrome in disabled security mode t

12条回答
  •  天涯浪人
    2020-11-30 12:48

    You must use the following flags

    --disable-web-security 
    --user-data-dir
    

    but also pass the path to your chrome user profile

    See this:

    https://productforums.google.com/forum/#!topic/chrome/9nHBcjNW384 https://bugs.chromium.org/p/chromium/issues/detail?id=575690

    So now i have top pass my user profile path:

    C:\Users\user\projects\project>"C:\Program Files (x86)\Google\Chrome\App
    lication\chrome.exe" --disable-web-security --user-data-dir="C:\Users\user\A
    ppData\Local\Google\Chrome\User Data\Default"
    

提交回复
热议问题