mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Don't force SSL when running from CLI (from r98272)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102639 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c07f3c8a8f
commit
c5fda512d6
@ -598,7 +598,7 @@ class Director {
|
||||
* </code>
|
||||
*/
|
||||
static function forceSSL() {
|
||||
if((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') && !Director::isDev()) {
|
||||
if((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') && !Director::isDev() && !Director::is_cli()) {
|
||||
$destURL = str_replace('http:', 'https:', Director::absoluteURL($_SERVER['REQUEST_URI']));
|
||||
|
||||
header("Location: $destURL", true, 301);
|
||||
|
Loading…
Reference in New Issue
Block a user