Handle HTTP header X-Real-IP to get IP address

This commit is contained in:
Frederic Guillot
2016-07-16 14:11:14 -04:00
parent 6cfce7720a
commit 4364559805
3 changed files with 5 additions and 0 deletions

View File

@@ -301,6 +301,7 @@ class Request extends Base
public function getIpAddress()
{
$keys = array(
'HTTP_X_REAL_IP',
'HTTP_CLIENT_IP',
'HTTP_X_FORWARDED_FOR',
'HTTP_X_FORWARDED',