set_real_ip_from 10.0.0.0/8;
set_real_ip_from 192.168.0.0/16;
set_real_ip_from 172.16.0.0/12;
set_real_ip_from 100.0.0.0/8;
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
real_ip_recursive on;

默认情况下 real_ip_recursive off; $remote_addr字段显示的是二级代理的IP

real_ip_recursive on; 这个是过滤掉set_real_ip_from中的可信IP,$remote_addr字段显示的是真实的客户端IP

 

相关文章:

  • 2021-06-19
  • 2023-03-19
  • 2021-07-19
  • 2021-04-03
  • 2021-07-05
  • 2021-07-15
猜你喜欢
  • 2021-10-23
  • 2021-12-15
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2021-05-26
相关资源
相似解决方案