mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2026-03-14 12:45:51 +01:00
parent
b24887d4fd
commit
cda40e22f1
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue