yiisoft/yii — pull request #2825 by Merioles (2013-08-29 04:42:30+00:00)
Title: Updated CHttpRequest::getUserHostAddress()

Updated CHttpRequest::getUserHostAddress() to first look for forwarded
IP (HTTP_X_FORWARDED_FOR). If there is none, then use REMOTE_ADDR. This
is useful for web apps running behind load balancers as this previously
may return the load balancer's IP instead of the client.