- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
您好,我的应用程序正在使用来自 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/
我是一名优秀的程序员,十分优秀!