IONIC - No' Access-Control-Allow-Origin'标头出现在请求的资源上。原点

时间:2017-09-28 05:39:55

标签: ionic-framework woocommerce

我正在研究离子应用程序。我的问题是:当我尝试从服务器获取数据时,我得到了这个:

Failed to load http://domainname.com/wc-api/v3/products?oauth_consumer_key=ck_1152790ee6b10fd740b98fa9668fbea1fc9fddbc&oauth_nonce=7LPagE0ILZsYph7HU713hqHilIWBXvkc&oauth_signature_method=HMAC-SHA256&oauth_timestamp=1506576888&oauth_version=1.0&oauth_signature=iGGEJFI1d9p7FbxMjxyNmPFOxjos0dzVuVOAFPgR9LI%3D: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

请帮助我,我使用过woocommerce api但无法获取数据。

1 个答案:

答案 0 :(得分:1)

我有解决方案,但我想知道它可以吗? 我已经使用了谷歌播放的这种扩展。 https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en