Restangular api calls to external getting 'No Access Allowed'

你说的曾经没有我的故事 提交于 2019-11-29 16:59:00

The server (api.angel.co) is not responding with Access-Control headers which results in this error.

When sending XHR requests to domains different from the origin domain web browsers are checking if the service allows this. In your case api.angel.co would need to include the header Access-Control-Allow-Origin: * as part of the response (which it does not).

Assuming you cannot change api.angel.co, an alternative would be to build a server-side proxy (e.g. in node.js) which allows Cross-Origin Resource Sharing.

Check out this great article about Cross-Origin Resource Sharing (CORS).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!