安装了一个插件,https://chrome.google.com/webstore/detail/allow-cors-access-control/lhobafahddgcelffkeicbaginigeejlf
但是不论我怎么设置,在本地调试的时候,都会碰到这个 错误。已经在插件里面,勾选了 Access-Control-Allow-Origin 。(不勾选,也不工作,还是报错)
Access to XMLHttpRequest at 'https://xxx.com' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
现在只能 打开 chrome disable security 来工作。("C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --disable-web-security --user-data-dir="C:/temp/chrome")
谢谢!