无法在iPhone上安装的Xcode app(Ionic)上访问API

时间:2017-12-05 00:55:32

标签: xcode ionic-framework ionic3

我设法通过Xcode在我的iPhone上安装我的Ionic应用程序。应用程序正常工作,除了我应该访问我的创建的API的部分。当我按下调用API的按钮(我正在通过Safari检查控制台)时,出现错误。事实上有三个错误。

[Error] Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.
[Error] Failed to load resource: Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin. (username, line 0)
[Error] XMLHttpRequest cannot load https://myapi.com/username due to access control checks.

对此有任何见解将不胜感激。

0 个答案:

没有答案