protected function handleSSLRedirection() { // Specifically disable for the opt out iframe if (Piwik::getModule() == 'CoreAdminHome' && Piwik::getAction() == 'optOut') { return; } // Disable Https for VisitorGenerator if (Piwik::getModule() == 'VisitorGenerator') { return; } if (Common::isPhpCliMode()) { return; } // Only enable this feature after Piwik is already installed if (!SettingsPiwik::isPiwikInstalled()) { return; } // proceed only when force_ssl = 1 if (!SettingsPiwik::isHttpsForced()) { return; } Url::redirectToHttps(); }