BUGFIX: Don't force SSL when running from CLI

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2@98254 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2010-02-04 22:06:37 +00:00 committed by Sam Minnee
parent e33a314256
commit 23a6e4f1ac

View File

@ -482,7 +482,7 @@ class Director {
* Force the site to run on SSL. To use, call from _config.php * Force the site to run on SSL. To use, call from _config.php
*/ */
static function forceSSL() { static function forceSSL() {
if(!isset($_SERVER['HTTPS']) && !Director::isDev()){ if(!isset($_SERVER['HTTPS']) && !Director::isDev() && !Director::is_cli()){
$destURL = str_replace('http:','https:',Director::absoluteURL($_SERVER['REQUEST_URI'])); $destURL = str_replace('http:','https:',Director::absoluteURL($_SERVER['REQUEST_URI']));
header("Location: $destURL"); header("Location: $destURL");