- haproxy support subdomain name with '.'

This commit is contained in:
James 2012-11-13 16:32:36 -05:00
parent dfede98b82
commit d8165cbf44

View file

@ -693,8 +693,16 @@ class ApiController extends Zend_Controller_Action
if (Application_Model_Preference::GetPlanLevel() != 'disabled'){ if (Application_Model_Preference::GetPlanLevel() != 'disabled'){
if ($component == "pypo"){ if ($component == "pypo"){
$split = explode('.', $_SERVER['SERVER_NAME']); $split = explode('.', $_SERVER['SERVER_NAME']);
if (count($split) > 0){ $subdomain = array();
$subDomain = $split[0]; foreach ($split as $value) {
if ($value == 'airtime') {
break;
} else {
$subdomain[] = $value;
}
}
if (count($subdomain) > 0){
$subDomain = implode('.',$subdomain);
$md = array(); $md = array();
$md["sub_domain"] = $subDomain; $md["sub_domain"] = $subDomain;