mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2025-06-23 11:32:38 +02:00
@ -246,7 +246,9 @@ if (isset($_GET['logout'])) {
|
||||
// Validate connection IP
|
||||
if ($ip_ruleset != 'OFF') {
|
||||
function getClientIP() {
|
||||
if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) {
|
||||
if (array_key_exists('HTTP_CF_CONNECTING_IP', $_SERVER)) {
|
||||
return $_SERVER["HTTP_CF_CONNECTING_IP"];
|
||||
}else if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) {
|
||||
return $_SERVER["HTTP_X_FORWARDED_FOR"];
|
||||
}else if (array_key_exists('REMOTE_ADDR', $_SERVER)) {
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
|
Reference in New Issue
Block a user