Merge pull request #28387 from nextcloud/backport/25605/stable20

[stable20] dont show trusted proxy warning when the proxy and remote are both localhost
This commit is contained in:
MichaIng 2021-08-15 12:35:26 +02:00 committed by GitHub
commit aec579b0cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -307,7 +307,7 @@ class CheckSetupController extends Controller {
return false;
}
if (\is_array($trustedProxies) && \in_array($remoteAddress, $trustedProxies, true)) {
if (\is_array($trustedProxies) && \in_array($remoteAddress, $trustedProxies, true) && $remoteAddress !== '127.0.0.1') {
return $remoteAddress !== $this->request->getRemoteAddress();
}