jumpserver集群部署方式下日志中显示的登录IP都是HAProxy的IP的咨询

按照部署文档,成功部署了集群模式的jumpserver,能够正常使用,但是查看日志的时候发现,登录的IP全部都是集群HAProxy的IP,请问有办法实现日志记录真实的IP不呢?谢谢!

你haproxy配置里加透传了嘛?举个例子:
server app1 10.. .*1:4000 send-proxy check inter 2000 fall 3
把这个send-proxy加进去,试一下

好的,我试一下,谢谢,我看部署文档中,只有jms-ssh和jms-magnus加了sned-proxy,其他的都没加

配置里是直接按部署文档中的示例配置的,如下
listen jms-web
bind *:80 # 监听 80 端口
mode http

# redirect scheme https if !{ ssl_fc }  # 重定向到 https
# bind *:443 ssl crt /opt/ssl.pem       # https 设置

option httpchk GET /api/health/         # Core 检活接口

stick-table type ip size 200k expire 30m
stick on src

balance leastconn
server 192.168.100.21 192.168.100.21:80 weight 1 cookie web01 check inter 2s rise 2 fall 3  # JumpServer 服务器
server 192.168.100.22 192.168.100.22:80 weight 1 cookie web02 check inter 2s rise 2 fall 3
server 192.168.100.23 192.168.100.23:80 weight 1 cookie web03 check inter 2s rise 2 fall 3
server 192.168.100.24 192.168.100.24:80 weight 1 cookie web03 check inter 2s rise 2 fall 3

上面这三行如果在最后或是:80后面加send-proxy或是在check inter前面加,结果都是启动服务后,访问页面时直接报找不到