From 23a6e4f1ac4af1c9bf68c54c3f87592dcc97f287 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Thu, 4 Feb 2010 22:06:37 +0000 Subject: [PATCH] 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 --- core/control/Director.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/control/Director.php b/core/control/Director.php index c145d1f4f..317960258 100644 --- a/core/control/Director.php +++ b/core/control/Director.php @@ -482,7 +482,7 @@ class Director { * Force the site to run on SSL. To use, call from _config.php */ 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'])); header("Location: $destURL");