From 6415652743526a9b25a53b0cab4ffa0db020f42b Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 3 Aug 2016 14:05:14 +1000 Subject: [PATCH] Added another method to determine client IP address --- system/classes/Kohana/Request.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/classes/Kohana/Request.php b/system/classes/Kohana/Request.php index 84bf9dc..be0266b 100644 --- a/system/classes/Kohana/Request.php +++ b/system/classes/Kohana/Request.php @@ -124,6 +124,11 @@ class Kohana_Request implements HTTP_Request { unset($client_ips); } + elseif (isset($_SERVER['HTTP_X_REAL_IP'])) + { + // The remote IP address + Request::$client_ip = $_SERVER['HTTP_X_REAL_IP']; + } elseif (isset($_SERVER['REMOTE_ADDR'])) { // The remote IP address