summaryrefslogtreecommitdiffstats
path: root/lib/helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 37914b73e17..6ab55f27618 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -75,6 +75,9 @@ class OC_Helper {
* reverse proxies
*/
public static function serverHost() {
+ if(OC::$CLI){
+ return 'localhost';
+ }
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
if (strpos($_SERVER['HTTP_X_FORWARDED_HOST'], ",") !== false) {
$host = trim(array_pop(explode(",", $_SERVER['HTTP_X_FORWARDED_HOST'])));