aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/resources/private/relative.php
diff options
context:
space:
mode:
authorGitea <gitea@fake.local>2021-11-10 17:53:13 +0100
committerGitea <gitea@fake.local>2021-11-10 17:53:13 +0100
commit7b4af63a90a726b98a59b83e53f040a7a566a11d (patch)
treeb85747947816fe4375e85ab6b822ffabec548c7b /Neutron-trunk/resources/private/relative.php
parent80f78c2925530e945503ab603e79d1acc53075f4 (diff)
downloadelectrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.tar.gz
electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.tar.bz2
electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.zip
Update
Diffstat (limited to 'Neutron-trunk/resources/private/relative.php')
-rw-r--r--[-rwxr-xr-x]Neutron-trunk/resources/private/relative.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/Neutron-trunk/resources/private/relative.php b/Neutron-trunk/resources/private/relative.php
index d9156e6..a42a87f 100755..100644
--- a/Neutron-trunk/resources/private/relative.php
+++ b/Neutron-trunk/resources/private/relative.php
@@ -3,6 +3,10 @@
function getRelativeDetails($source) {
global $__root;
+ if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
+ $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
+ }
+
$GLOBALS["ORIGINAL_DOCUMENT_ROOT"] = $_SERVER['DOCUMENT_ROOT'];
if (substr($_SERVER['REQUEST_URI'], 0, strlen($source) + 1) === "/" . $source) {
@@ -28,4 +32,4 @@ function getRelativeDetails($source) {
$_SERVER['DOCUMENT_ROOT'] = $GLOBALS["ORIGINAL_DOCUMENT_ROOT"];
$GLOBALS["SYSTEM_PREFIXED"] = false;
}
-} \ No newline at end of file
+}