aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/lib/Controller
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-11-13 17:07:25 +0100
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>2023-11-20 11:36:42 +0100
commit0107c7ea24a28779dad09117d8dc5a4a49b95dc5 (patch)
treebf287152cf5a5076288a2b7a2fb822ba882ad8da /apps/settings/lib/Controller
parent0da05fc73b720702b76d8838228f3ce648793482 (diff)
downloadnextcloud-server-0107c7ea24a28779dad09117d8dc5a4a49b95dc5.tar.gz
nextcloud-server-0107c7ea24a28779dad09117d8dc5a4a49b95dc5.zip
Migrate Forwarded For Headers check to new API
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/settings/lib/Controller')
-rw-r--r--apps/settings/lib/Controller/CheckSetupController.php26
1 files changed, 0 insertions, 26 deletions
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php
index 6d74a670a07..13e54063d8a 100644
--- a/apps/settings/lib/Controller/CheckSetupController.php
+++ b/apps/settings/lib/Controller/CheckSetupController.php
@@ -247,31 +247,6 @@ class CheckSetupController extends Controller {
}
/**
- * Check if the reverse proxy configuration is working as expected
- *
- * @return bool
- */
- private function forwardedForHeadersWorking(): bool {
- $trustedProxies = $this->config->getSystemValue('trusted_proxies', []);
- $remoteAddress = $this->request->getHeader('REMOTE_ADDR');
-
- if (empty($trustedProxies) && $this->request->getHeader('X-Forwarded-Host') !== '') {
- return false;
- }
-
- if (\is_array($trustedProxies)) {
- if (\in_array($remoteAddress, $trustedProxies, true) && $remoteAddress !== '127.0.0.1') {
- return $remoteAddress !== $this->request->getRemoteAddress();
- }
- } else {
- return false;
- }
-
- // either not enabled or working correctly
- return true;
- }
-
- /**
* Checks if the correct memcache module for PHP is installed. Only
* fails if memcached is configured and the working module is not installed.
*
@@ -721,7 +696,6 @@ Raw output
'cronErrors' => $this->getCronErrors(),
'isFairUseOfFreePushService' => $this->isFairUseOfFreePushService(),
'isUsedTlsLibOutdated' => $this->isUsedTlsLibOutdated(),
- 'forwardedForHeadersWorking' => $this->forwardedForHeadersWorking(),
'reverseProxyDocs' => $this->urlGenerator->linkToDocs('admin-reverse-proxy'),
'isCorrectMemcachedPHPModuleInstalled' => $this->isCorrectMemcachedPHPModuleInstalled(),
'hasPassedCodeIntegrityCheck' => $this->checker->hasPassedCheck(),