簡體   English   中英

Woocommerce中沒有“ Access-Control-Allow-Origin”標頭

[英]No 'Access-Control-Allow-Origin' header in Woocommerce

我正在嘗試為我的移動應用程序使用Woocommerce API,但出現以下錯誤。

XMLHttpRequest cannot load https://www.weburl.com/wc-api/v3/?consumer_key=ck_ckcomeshere&consumer_secret=cs_cscomeshere. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.1.105:8100' is therefore not allowed access.

我該如何解決此問題。 非常感謝您的幫助。

雖然不是很安全,但這確實成功了。 apache.conf下行添加到您的.htaccessapache.conf文件中。

Header set Access-Control-Allow-Origin "*"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM