diff --git a/airtime_mvc/application/common/HTTPHelper.php b/airtime_mvc/application/common/HTTPHelper.php index 80e6fd16e..c3ff70858 100644 --- a/airtime_mvc/application/common/HTTPHelper.php +++ b/airtime_mvc/application/common/HTTPHelper.php @@ -31,6 +31,7 @@ class Application_Common_HTTPHelper $baseUrl = $CC_CONFIG['baseUrl']; $baseDir = $CC_CONFIG['baseDir']; $basePort = $CC_CONFIG['basePort']; + $forceSSL = $CC_CONFIG['forceSSL']; if (empty($baseDir)) { $baseDir = "/"; } @@ -42,7 +43,7 @@ class Application_Common_HTTPHelper } $scheme = "http"; - if ($secured && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') { + if ($forceSSL || ($secured && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')) { $scheme = "https"; $basePort = "443"; //Airtime Pro compatibility hack } diff --git a/airtime_mvc/application/configs/conf.php b/airtime_mvc/application/configs/conf.php index 964225e8c..6295d410e 100644 --- a/airtime_mvc/application/configs/conf.php +++ b/airtime_mvc/application/configs/conf.php @@ -31,6 +31,7 @@ class Config { $CC_CONFIG['basePort'] = $values['general']['base_port']; $CC_CONFIG['stationId'] = $values['general']['station_id']; $CC_CONFIG['phpDir'] = $values['general']['airtime_dir']; + $CC_CONFIG['forceSSL'] = isset($values['general']['force_ssl']) ? $values['general']['force_ssl'] : FALSE; if (isset($values['general']['dev_env'])) { $CC_CONFIG['dev_env'] = $values['general']['dev_env']; } else { diff --git a/airtime_mvc/build/airtime.example.conf b/airtime_mvc/build/airtime.example.conf index 96487f3ce..7e3ebf479 100644 --- a/airtime_mvc/build/airtime.example.conf +++ b/airtime_mvc/build/airtime.example.conf @@ -53,6 +53,7 @@ web_server_user = www-data base_url = localhost base_port = 80 base_dir = / +force_ssl = cache_ahead_hours = 1 airtime_dir = station_id =