Airtime Pro SSL compatibility hack

This commit is contained in:
Albert Santoni 2015-02-25 16:19:01 -05:00
parent 5acad059de
commit 7d534d1cda
1 changed files with 7 additions and 4 deletions

View File

@ -20,10 +20,6 @@ class Application_Common_HTTPHelper
public static function getStationUrl()
{
$scheme = "http";
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
$scheme = "https";
}
$CC_CONFIG = Config::getConfig();
$baseUrl = $CC_CONFIG['baseUrl'];
$baseDir = $CC_CONFIG['baseDir'];
@ -34,6 +30,13 @@ class Application_Common_HTTPHelper
if ($baseDir[0] != "") {
$baseDir = "/" . $baseDir;
}
$scheme = "http";
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
$scheme = "https";
$basePort = "443"; //Airtime Pro compatibility hack
}
$stationUrl = "$scheme://${baseUrl}:${basePort}${baseDir}";
return $stationUrl;