3
我尝试使用$ HTTP(角),此代码发送HTTP请求:离子,访问控制允许来源
$http({
method: 'GET',
url: 'http://192.168.0.17:9000',
header: {'Access-Control-Allow-Origin': "*"},
}).then(getEventsSuccess, getEventsError);
但是,这并不工作,我在Web控制台此错误:
XMLHttpRequest cannot load http://192.168.0.17:9000/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.
您有解决方案吗?
访问控制允许来源必须设置服务器端,而不是客户端 – Jamby
听起来像CORS问题 – swapnesh
我做它在两侧,但同样的问题。 .. –