X-Forwarded-For和X-Forwarded-IP有什么区别? [英] What is the difference between X-Forwarded-For and X-Forwarded-IP?
问题描述
要在我的ASP.NET应用程序中获取客户端IP地址,我使用了X-Forwarded-For,并从列表中获取第一个IP地址(根据我找到的信息,有一个客户端, proxy1,proxy2 ..)。但我最近听说最好从X-Forwarded-IP头获取此信息,因为X-Forwarded-For中的客户端IP地址可以通过代理修改,有什么区别,我应该使用哪个地址?
X-Forwarded-For
是识别连接到来自 web 服务器的用户的原始IP地址的传统方式HTTP代理,负载均衡器。
X-Forwarded-IP
是通过HTTP邮件服务识别连接到电子邮件服务器的用户的原始IP地址的传统方式。 / p>
To obtain the client IP address in my ASP.NET application I've used the X-Forwarded-For, and get the first IP address from the list (accordingly to the information I've found, there is a client, proxy1, proxy2..). But I've heard recently that it is better to get this information from X-Forwarded-IP header because the client IP address in X-Forwarded-For can be modified by proxy, what is the difference, and which one address should I use?
X-Forwarded-For
is the conventional way of identifying the originating IP address of the user connecting to the web server coming from either a HTTP proxy, load balancer.
X-Forwarded-IP
is the conventional way of identifying the originating IP address of the user connecting to the email server through an HTTP mail service.
这篇关于X-Forwarded-For和X-Forwarded-IP有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!