Django Book 翻译
菜单>:
TOC
返回
原文:
If this is installed (see the next section), every requests ``X-Forwarded-For`` value will be automatically inserted into ``request.META['REMOTE_ADDR']`` . This means your Django applications dont need to be concerned with whether theyre behind a load-balancing proxy or not; they can simply access ``request.META['REMOTE_ADDR']`` , and that will work whether or not a proxy is being used.
翻译:
一旦安装了该中间件(参见下一节),每个request中的 ``X-Forwarded-For`` 值都会被自动插入到 ``request.META['REMOTE_ADDR']`` 中。这样,Django应用就不需要关心自己是否位于负载平衡proxy之后;简单读取 ``request.META['REMOTE_ADDR']`` 的方式在是否有proxy的情形下都将正常工作。
备注:
译者: