diff --git a/lib/SelfTest.php b/lib/SelfTest.php
index fd42cff7..9ea2f46c 100644
--- a/lib/SelfTest.php
+++ b/lib/SelfTest.php
@@ -133,14 +133,14 @@ public function test(string $server, OutputInterface $output, bool $ignoreProxyE
// test that the push server is a trusted proxy
try {
- $remote = $this->client->get($server . '/test/remote/1.2.3.4', ['nextcloud' => ['allow_local_address' => true], 'verify' => false])->getBody();
+ $resolvedRemote = $this->client->get($server . '/test/remote/1.2.3.4', ['nextcloud' => ['allow_local_address' => true], 'verify' => false])->getBody();
} catch (\Exception $e) {
$msg = $e->getMessage();
$output->writeln("🗴 can't connect to push server: $msg");
return self::ERROR_OTHER;
}
- if ($ignoreProxyError || $remote === '1.2.3.4') {
+ if ($ignoreProxyError || $resolvedRemote === '1.2.3.4') {
$output->writeln("✓ push server is a trusted proxy");
} else {
$trustedProxies = $this->config->getSystemValue('trusted_proxies', []);
@@ -154,7 +154,7 @@ public function test(string $server, OutputInterface $output, bool $ignoreProxyE
return self::ERROR_TRUSTED_PROXY;
}
- $output->writeln("🗴 push server is not a trusted proxy, please add '$remote' to the list of trusted proxies" .
+ $output->writeln("🗴 push server is not a trusted proxy, please add '$resolvedRemote' to the list of trusted proxies" .
" or configure any existing reverse proxy to forward the 'x-forwarded-for' send by the push server.");
$output->writeln(" See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#defining-trusted-proxies for how to set trusted proxies.");
$output->writeln(" The following trusted proxies are currently configured: " . implode(', ', array_map(function (string $proxy) {