Cross Domain Ajax Call in Atom Shell
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: We are working with Atom Shell (Currently known as electron ) to wrap a web application as desktop app and having trouble making cross domain ajax calls due to CORS restriction. We also tried nw.js (Formerly known as Node-Webkit) and we had no problem making cross domain ajax call with it. Is Atom Shell (Electron) restricts cross domain calls by default ? 回答1: If the webpage is loaded in "file://" mode and not served by an http server, you can make ajax calls by default. If you still have troubles with CORS restrictions, you can