diff options
Diffstat (limited to 'tests/codeigniter')
-rw-r--r-- | tests/codeigniter/core/Input_test.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php index c56900d22..e1f4011b5 100644 --- a/tests/codeigniter/core/Input_test.php +++ b/tests/codeigniter/core/Input_test.php @@ -262,6 +262,12 @@ class Input_test extends CI_TestCase { $this->assertEquals('FE80:0000:0000:0000:0202:B3FF:FE1E:8300', $this->input->ip_address()); $this->input->ip_address = FALSE; + $this->ci_set_config('proxy_ips', '0::/32'); + $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.7'; + $_SERVER['REMOTE_ADDR'] = '0000:0000:0000:0000:0000:0000:0000:0001'; + $this->assertEquals('127.0.0.7', $this->input->ip_address()); + + $this->input->ip_address = FALSE; $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; // back to reality } |