站点使用cloudflare时无法连接api
我有一个也提供 api 的服务站点。
但我的网站用户无法使用该api,因为该网站已连接到cloudflare!
我通过 file_get_contents 连接到我的网站,但收到错误
这意味着我将 mywebsite.com/test.php 连接到 mywebsite.com/api/v2 ...
我得到此错误:
Warning: file_get_contents(): Peer certificate CN=`amazeservice.net' did not match expected CN=`mywebsite.com' in /home/mywebsite/public_html/test.php on line 3
Warning: file_get_contents(): Failed to enable crypto in /home/mywebsite/public_html/test.php on line 3
Warning: file_get_contents(https://mywebsite.com/api/v2): failed to open stream: operation failed in /home/mywebsite/public_html/test.php on line 3
我尝试在我的 cloudflare 论坛中提出这个问题,但我不知道为什么无法发布问题。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
现在,Cloudflare API 安全产品仅向企业客户提供。
https://developers.cloudflare.com/api-shield/
Now, Cloudflare API Security products are available to Enterprise customers only.
https://developers.cloudflare.com/api-shield/