Django Book 翻译
菜单>:
TOC
返回
原文:
If youre not behind a reverse proxy that sets ``HTTP_X_FORWARDED_FOR`` automatically, do not use this middleware. Anybody can spoof the value of ``HTTP_X_FORWARDED_FOR`` , and because this sets ``REMOTE_ADDR`` based on ``HTTP_X_FORWARDED_FOR`` , that means anybody can fake his IP address.
翻译:
如果站点并不位于自动设置 ``HTTP_X_FORWARDED_FOR`` 的反向代理之后,请不要使用这个中间件。否则,因为任何人都能够伪造 ``HTTP_X_FORWARDED_FOR`` 值,而 ``REMOTE_ADDR`` 又是依据 ``HTTP_X_FORWARDED_FOR`` 来设置,这就意味着任何人都能够伪造IP地址。
备注:
译者: