summaryrefslogtreecommitdiffstats
path: root/apps/user_openid
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 /apps/user_openid
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 'apps/user_openid')
-rw-r--r--apps/user_openid/phpmyid.php2
-rw-r--r--apps/user_openid/user_openid.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php
index 137daa485a9..5aaab642856 100644
--- a/apps/user_openid/phpmyid.php
+++ b/apps/user_openid/phpmyid.php
@@ -1624,7 +1624,7 @@ if (! array_key_exists('idp_url', $profile))
//Determine the requested URL - DO NOT OVERRIDE
$profile['req_url'] = sprintf("%s://%s%s",
$proto,
- $_SERVER['HTTP_HOST'],
+ OCP\Util::getServerHost(),
// $port,//host already includes the path
$_SERVER["REQUEST_URI"]);
diff --git a/apps/user_openid/user_openid.php b/apps/user_openid/user_openid.php
index 8deb42f68c8..3267db3fa0f 100644
--- a/apps/user_openid/user_openid.php
+++ b/apps/user_openid/user_openid.php
@@ -39,9 +39,9 @@ class OC_USER_OPENID extends OC_User_Backend {
// Get identity from user and redirect browser to OpenID Server
$openid = new SimpleOpenID;
$openid->SetIdentity($uid);
- $openid->SetTrustRoot('http://' . $_SERVER["HTTP_HOST"]);
+ $openid->SetTrustRoot('http://' . OCP\Util::getServerHost());
if ($openid->GetOpenIDServer()){
- $openid->SetApprovedURL('http://' . $_SERVER["HTTP_HOST"] . OC::$WEBROOT); // Send Response from OpenID server to this script
+ $openid->SetApprovedURL('http://' . OCP\Util::getServerHost() . OC::$WEBROOT); // Send Response from OpenID server to this script
$openid->Redirect(); // This will redirect user to OpenID Server
exit;
}else{