nginx 禁止伪装IP攻击

No Comments IT必备工具

将真实IP    $remote_addr赋值给  X-Forwarded-For即可。

proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

发表评论