zoukankan      html  css  js  c++  java
  • X-Forwarded-For 出现多个ip

    request.getHeader("x-forwarded-for");
    出现多个ip且用逗号分隔: 210.21.71.88, 119.23.123.88

    有人说使用最后一个ip就是最原始的ip?
    请看维基百科:https://en.wikipedia.org/wiki/X-Forwarded-For

    The general format of the field is:

    X-Forwarded-For: client, proxy1, proxy2[3]

    where the value is a comma+space separated list of IP addresses, the left-most being the original client, and each successive proxy that passed the request adding the IP address where it received the request from. In this example, the request passed through proxy1, proxy2, and then proxy3 (not shown in the header). proxy3 appears as remote address of the request.

    结论:ip经过代理服务器,会出现上述情况,取第一个才是真实IP

    cnblogs.com/tomcatandjerry

  • 相关阅读:
    linux 软件多版本共存
    git new
    centos 7 重新设置分区大小
    yum 多线程插件,apt多线程插件
    配置opencv cmake
    cmake 配置
    OpenCV 静态库 CMAKE 文件
    cron
    开课啦
    pytorch转onnx问题
  • 原文地址:https://www.cnblogs.com/tomcatandjerry/p/8110205.html
Copyright © 2011-2022 走看看