$cfg->setConfigEntry('cookie_domain', $cfg->detectDomain()); // Is mostly the same...
// CFG: COOKIE-SSL
-$cfg->setConfigEntry('cookie_ssl', (isset($_SERVER['HTTPS'])));
+$cfg->setConfigEntry('cookie_ssl', $cfg->isHttpSecured());
// CFG: CRYPT-FIXED-SALT
$cfg->setConfigEntry('crypt_fixed_salt', 'N');