summaryrefslogtreecommitdiffstats
path: root/lib/ocs.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-31 20:26:09 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-31 20:26:09 +0200
commitd4ea853fcf3b3f82e2e489c81280b27bfbd62bf3 (patch)
tree606ec92fd57a5486d6e3468b8e1e1b463779c77d /lib/ocs.php
parentf0bd57186686689d0f65c356cd7f226c045dd6e3 (diff)
downloadnextcloud-server-d4ea853fcf3b3f82e2e489c81280b27bfbd62bf3.tar.gz
nextcloud-server-d4ea853fcf3b3f82e2e489c81280b27bfbd62bf3.zip
use our own serverHost call so that ownCloud works with reverse proxy servers
Diffstat (limited to 'lib/ocs.php')
-rw-r--r--lib/ocs.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ocs.php b/lib/ocs.php
index e28eb61987c..1be41202d78 100644
--- a/lib/ocs.php
+++ b/lib/ocs.php
@@ -357,11 +357,11 @@ class OC_OCS {
*/
private static function apiConfig($format) {
$user=OC_OCS::checkpassword(false);
- $url=substr($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'],0,-11).'';
+ $url=substr(OCP\Util::getServerHost().$_SERVER['SCRIPT_NAME'],0,-11).'';
$xml['version']='1.5';
$xml['website']='ownCloud';
- $xml['host']=$_SERVER['HTTP_HOST'];
+ $xml['host']=OCP\Util::getServerHost();
$xml['contact']='';
$xml['ssl']='false';
echo(OC_OCS::generatexml($format,'ok',100,'',$xml,'config','',1));