diff options
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index c7fde4136fe..83f97963c4d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -161,6 +161,9 @@ class OC { 'SCRIPT_FILENAME' => $_SERVER['SCRIPT_FILENAME'] ?? null, ], ]; + if (isset($_SERVER['REMOTE_ADDR'])) { + $params['server']['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR']; + } $fakeRequest = new \OC\AppFramework\Http\Request( $params, new \OC\AppFramework\Http\RequestId($_SERVER['UNIQUE_ID'] ?? '', new \OC\Security\SecureRandom()), |