diff --git a/codepot/src/codepot/models/loginmodel.php b/codepot/src/codepot/models/loginmodel.php index d52b2ece..fc8eca82 100644 --- a/codepot/src/codepot/models/loginmodel.php +++ b/codepot/src/codepot/models/loginmodel.php @@ -17,7 +17,8 @@ class LoginModel extends Model function getUser () { - $server1 = $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT']; + //$server1 = $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT']; + $server1 = $_SERVER['HTTP_HOST']; $server2 = $this->session->userdata('server'); if ($server1 != $server2) { @@ -55,7 +56,8 @@ class LoginModel extends Model function authenticate ($userid, $password, $email = '') { - $server = $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT']; + //$server = $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT']; + $server = $_SERVER['HTTP_HOST']; $sysadmin = FALSE; $ids = explode (',', CODEPOT_SYSADMIN_USERIDS); diff --git a/codepot/src/config.php.in b/codepot/src/config.php.in index dcab4f3d..aad3b534 100644 --- a/codepot/src/config.php.in +++ b/codepot/src/config.php.in @@ -31,7 +31,8 @@ function load_ini ($file) array ('https_compulsory', 'boolean', FALSE), array ('https_url', 'string', 'https://${SERVER_NAME}${REQUEST_URI}'), array ('api_base_url', 'string', 'http://127.0.0.1'), - array ('svn_base_url', 'string', 'http://${SERVER_NAME}:${SERVER_PORT}/svn'), + //array ('svn_base_url', 'string', '${REQUEST_PROTOCOL}://${SERVER_NAME}:${SERVER_PORT}/svn'), + array ('svn_base_url', 'string', '${REQUEST_PROTOCOL}://${HTTP_POST}/svn'), array ('login_model', 'string', 'LdapLoginModel'), array ('sysadmin_userids', 'string', ''),