From d293293cdaf10745459e98cce70412882241fdec Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 16 May 2023 11:39:39 +0200 Subject: Fixed bug which 'overwritewebroot' does not work with 'overwritecondaddr'. Signed-off-by: Takahiro Nagai <78393959+takahiro-blab@users.noreply.github.com> Signed-off-by: Simon L --- lib/base.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/base.php') 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()), -- cgit v1.2.3