[英]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
下行添加到您的.htaccess
或apache.conf
文件中。
Header set Access-Control-Allow-Origin "*"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.