Skip to content

Commit

Permalink
Merge pull request #28387 from nextcloud/backport/25605/stable20
Browse files Browse the repository at this point in the history
[stable20] dont show trusted proxy warning when the proxy and remote are both localhost
  • Loading branch information
MichaIng authored Aug 15, 2021
2 parents 03613b2 + 6061a28 commit aec579b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/settings/lib/Controller/CheckSetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ private function forwardedForHeadersWorking() {
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();
}

Expand Down

0 comments on commit aec579b

Please sign in to comment.