mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-05-06 07:43:14 +02:00
parent
b24887d4fd
commit
cda40e22f1
|
@ -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'];
|
||||
|
|
Loading…
Reference in a new issue