summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-08-11 14:02:46 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-08-11 14:02:46 +0200
commitaed068b237e8b654487941b10bfb45066fcdc5c2 (patch)
tree4ee125fdbb19653666db68e91db54685bf0ca524 /lib
parentd5bba42030b0243967baecb86baf46209ce556f4 (diff)
parent2579999373e628c1d6d4d08d1d89412f1fd68fe3 (diff)
downloadnextcloud-server-aed068b237e8b654487941b10bfb45066fcdc5c2.tar.gz
nextcloud-server-aed068b237e8b654487941b10bfb45066fcdc5c2.zip
Merge pull request #17868 from owncloud/x-forwarded-for
Set default 'forwarded for' headers for reverse proxy
Diffstat (limited to 'lib')
-rw-r--r--lib/private/appframework/http/request.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php
index 43f01dfde3f..aaad286e843 100644
--- a/lib/private/appframework/http/request.php
+++ b/lib/private/appframework/http/request.php
@@ -452,7 +452,10 @@ class Request implements \ArrayAccess, \Countable, IRequest {
$trustedProxies = $this->config->getSystemValue('trusted_proxies', []);
if(is_array($trustedProxies) && in_array($remoteAddress, $trustedProxies)) {
- $forwardedForHeaders = $this->config->getSystemValue('forwarded_for_headers', []);
+ $forwardedForHeaders = $this->config->getSystemValue('forwarded_for_headers', [
+ 'HTTP_X_FORWARDED_FOR'
+ // only have one default, so we cannot ship an insecure product out of the box
+ ]);
foreach($forwardedForHeaders as $header) {
if(isset($this->server[$header])) {