美文网首页
nginx-proxy-ip

nginx-proxy-ip

作者: 疏影浅清 | 来源:发表于2018-10-25 19:03 被阅读0次

    #获取用户真实IP,并赋值给变量$clientRealIP

    map $http_x_forwarded_for  $clientRealIp {

      "" $remote_addr;

            ~^(?P<firstAddr>[0-9\.]+),?.*$  $firstAddr;

    }

    相关文章

      网友评论

          本文标题:nginx-proxy-ip

          本文链接:https://www.haomeiwen.com/subject/faictqtx.html