gpt4 book ai didi

amazon-web-services - 使用 AWS API Gateway 时出现 Cloudflare 521 错误

转载 作者:行者123 更新时间:2023-12-03 08:04:03 41 4
gpt4 key购买 nike

在 Lambda 函数前面部署 API 网关函数并使用 Cloudflare 设置它后,我不断收到来自 Cloudflare 的 521 错误。

我已完成所有必要的步骤,例如生成证书、在 API Gateway 中创建自定义域等。

为什么在将 AWS API Gateway 与 Cloudflare 结合使用时会收到 521 错误?

最佳答案

事实证明,在 Cloudflare 中,SSL 设置必须设置为 FullFull (strict)。否则,您将从 Cloudflare 收到 521 错误。

这是因为 AWS API Gateway 不允许 HTTP 连接,需要 HTTPS 连接。在 Cloudflare 中将 HTTPS 设置为关闭灵活 时,它将不会通过 HTTPS 连接,因此无法连接到 AWS。

当然,建议使用完全(严格)以确保您网站的额外安全性。

关于amazon-web-services - 使用 AWS API Gateway 时出现 Cloudflare 521 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73009087/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com