从负载平衡器获取Orgin IP [英] Getting Orgin IP From Load Balancer

查看:113
本文介绍了从负载平衡器获取Orgin IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以从HTTP负载平衡获得用户的起始IP(使用GCloud)?我们目前只使用网络负载平衡,并且需要迁移到跨区域平衡器,尽管我们需要用户的IP来进行合规性和日志记录。



它传递给头文件或其他内容?



谢谢〜Z

解决方案

文档( https://cloud.google.com/compute/docs/load -balancing / http / )表示它是X-Forwarded-For头的第一个IP地址。

  X -Forwarded-For:<客户IP(s)>,<全局转发规则外部IP> 


Is there a way to get the origin IP of the user from the HTTP load balancing w/ GCloud? We are currently using just Network Load Balancing, and are needing to move to a cross region balancer although we need to user's IP for compliance and logging.

Does it pass in a header or something along those lines?

Thanks ~Z

解决方案

The documentation (https://cloud.google.com/compute/docs/load-balancing/http/) says it's the first IP address of the X-Forwarded-For header.

  X-Forwarded-For: <client IP(s)>, <global forwarding rule external IP>

这篇关于从负载平衡器获取Orgin IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆