Do not redirect to SSL when invoked on the CLI

This commit is contained in:
Kijin Sung 2017-03-13 13:46:49 +09:00
parent eec75ba372
commit 51d0aa5e5e

View file

@ -273,7 +273,7 @@ class Context
}
// Redirect to SSL if the current domain always uses SSL.
if ($site_module_info->security === 'always' && !RX_SSL)
if ($site_module_info->security === 'always' && !RX_SSL && PHP_SAPI !== 'cli')
{
$ssl_url = self::getDefaultUrl($site_module_info) . RX_REQUEST_URL;
self::setCacheControl(0);