summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2018-10-25 22:26:49 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2018-10-25 22:26:49 +0200
commit986f4df2a59547ae08359fe7907147577222a8a7 (patch)
tree29471d4ae8a5a118885e19984319aa2078d63c3f
parent6ad7f329385f73a731f69d9f00cf5b038f3eac04 (diff)
downloadnextcloud-server-986f4df2a59547ae08359fe7907147577222a8a7.tar.gz
nextcloud-server-986f4df2a59547ae08359fe7907147577222a8a7.zip
Add REMOTE_ADDR to getHeader
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
-rw-r--r--lib/private/AppFramework/Http/Request.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 0485d178b49..1d5a29f74f9 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -320,14 +320,18 @@ class Request implements \ArrayAccess, \Countable, IRequest {
// There's a few headers that seem to end up in the top-level
// server array.
- switch($name) {
+ switch ($name) {
case 'CONTENT_TYPE' :
case 'CONTENT_LENGTH' :
if (isset($this->server[$name])) {
return $this->server[$name];
}
break;
-
+ case 'REMOTE_ADDR' :
+ if (isset($this->server[$name])) {
+ return $this->server[$name];
+ }
+ break;
}
return '';