如何在Chrome Mac中禁用Cors

ir2pid

开发离子应用程序时,我始终收到以下错误。这是后端不允许的授权标头。

在此处输入图片说明

尝试的解决方案:

  • 我在这里使用chrome cors插件:https ://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi ?hl= zh-CN

在此处输入图片说明

  • 并开始启用chrome禁用网络安全,如下所示

打开-一个Google \ Chrome浏览器--args --disable-web-security --user-data-dir

但我仍然无法绕过cors检查,错误仍然存​​在。需要一些帮助。

阿尔特姆·阿尔希波夫

Check the version of your Chrome browser. Probably it is one with a bug. Here are bug reports posted on May about this feature not working: https://bugs.chromium.org/p/chromium/issues/detail?id=857032

I have faced the same issue few weeks ago and here is how I managed to get disabled CORS: Firstly download the Chromium browser or Chrome canary browser, which are actually very good for developers (I user chromium, but it is up to you): https://www.google.com/intl/en/chrome/canary/ or https://download-chromium.appspot.com/

Then:

  • Install browser
  • If you run browser - close it and make sure that there is no more running instances
  • Then run it with such command: open -a ChromiumOrCanaryPathHere --args --disable-web-security --user-data-dir"

Now it should work. You probably will see warning message about security on the top of the window - that is OK.

PS可能只是将chrome更新到最新版本可能会有所帮助,但是我更喜欢使用单独的浏览器,因为它更安全,因为我可以将不安全的浏览器与默认浏览器隔离开来。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章