开发离子应用程序时,我始终收到以下错误。这是后端不允许的授权标头。
尝试的解决方案:
打开-一个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:
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] 删除。
我来说两句