mirror of
https://github.com/moodle/moodle.git
synced 2025-04-28 11:55:58 +02:00
Merge branch 'MDL-47214-master' of github.com:andrewnicols/moodle
This commit is contained in:
commit
f2a8ecfae9
@ -8630,7 +8630,7 @@ function getremoteaddr($default='0.0.0.0') {
|
||||
if (!($variablestoskip & GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR)) {
|
||||
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
$hdr = explode(",", $_SERVER['HTTP_X_FORWARDED_FOR']);
|
||||
$address = $hdr[0];
|
||||
$address = cleanremoteaddr($hdr[0]);
|
||||
return $address ? $address : $default;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user