0

我可以将 CORS 代码嵌入到我的客户端 javascript/jquery 代码中,而不是使用“ https://cors-anywhere.herokuapp.com/ ”以及我的 URL。因为很多时候它给出了应用程序错误,我无法访问我的 URL。如果我在任何地方都有 CORS 的本地副本会很方便。任何帮助表示赞赏。

4

1 回答 1

1

您可以在本地开发机器上安装反向代理脚本。请参阅https://github.com/Rob--W/cors-anywhere/ 您将需要 NodeJS 才能在您的机器上运行。或者,如果您处于开发阶段并且需要绕过 CORS,您可以使用以下命令行在 Windows 上启动 chrome 浏览器:

start .\chrome.exe --disable-web-security --user-data-dir="D:/Chrome"
于 2017-10-19T13:16:58.300 回答