gpt4 book ai didi

amazon-web-services - aws 上的 reCaptcha 和负载均衡器

转载 作者:行者123 更新时间:2023-12-05 05:20:13 24 4
gpt4 key购买 nike

您好,我的应用程序正在使用来自 google 的 recaptcha,当仅通过 nginx 提供服务时,它工作正常。现在我们已经设置了一切以在 aws 上的负载均衡器后面工作,它给出了无效的响应并且用户无法注册。

有人对为什么会发生这种情况提出建议吗?

最佳答案

您必须启用代理协议(protocol)设置以获取客户端的 IP 和粘性 session ,以便应用程序知道该 session 已通过验证并返回到同一应用程序服务器。

Proxy Protocol is an Internet protocol used to carry connection information from the source requesting the connection to the destination for which the connection was requested. Elastic Load Balancing uses Proxy Protocol version 1, which uses a human-readable header format.

By default, when you use Transmission Control Protocol (TCP) for both front-end and back-end connections, your Classic Load Balancer forwards requests to the instances without modifying the request headers. If you enable Proxy Protocol, a human-readable header is added to the request header with connection information such as the source IP address, destination IP address, and port numbers. The header is then sent to the instance as part of the request.

http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html

http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html

关于amazon-web-services - aws 上的 reCaptcha 和负载均衡器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44745897/

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