Set REMOTE_ADDR to X-Forwarded-For in apache

前端 未结 9 1252
感情败类
感情败类 2020-12-29 10:06

In a situation where Apache is sitting behind a reverse proxy (such as Squid), the cgi environment variable REMOTE_ADDR gets the address of the proxy rather tha

9条回答
  •  感动是毒
    2020-12-29 10:28

    Remember that this value can be spoofed. See http://blog.c22.cc/2011/04/22/surveymonkey-ip-spoofing/ for a real-life example with Cross-site Scripting consequences.

提交回复
热议问题