mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
e33a314256
commit
23a6e4f1ac
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user