【问题标题】:How to fix Cross Origin Request Sharing issue in Chromium Portable?如何解决 Chromium Portable 中的跨域请求共享问题?
【发布时间】:2016-08-10 16:21:06
【问题描述】:

我正在尝试修复 Chromium Portable 中的 CORS 问题。添加了

 --allow-file-access-from-files --disable-web-security 

适用于旧版本,但不适用于最新版本。将无法在服务器端修改任何内容,也无法使用jsonp

我在控制台中遇到的错误是:

jquery.min.js:4 XMLHttpRequest cannot load https://website/heaarc/rest/HaAccess/hello. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'file://' is therefore not allowed access. The response had HTTP status code 401.

还有其他方法可以解决这个问题吗?

任何帮助将不胜感激。

【问题讨论】:

    标签: javascript jquery get cors chromium-portable


    【解决方案1】:

    最后通过为铬添加更新标志解决了这个问题。

    标志是:

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

    为了防止任何警告消息和弹出窗口,我使用了这个:

    -test-type
    

    【讨论】: