站点使用cloudflare时无法连接api

发布于 2025-01-14 04:55:17 字数 718 浏览 3 评论 0 原文

我有一个也提供 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 论坛中提出这个问题,但我不知道为什么无法发布问题。

I have a service site that also offers an api.

But my site users can not use the api, because the site is connected to cloudflare!

I connected to my site via file_get_contents, but got an error

That means I connected mywebsite.com/test.php to mywebsite.com/api/v2 ...

I got this error:

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

I tried to ask this question in my cloudflare forum, but I do not know why it is not possible to post a question.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ㄖ落Θ余辉 2025-01-21 04:55:17

现在,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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文