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
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98272 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a0ab707feb
commit
508316a19c
@ -598,7 +598,7 @@ class Director {
|
|||||||
* </code>
|
* </code>
|
||||||
*/
|
*/
|
||||||
static function forceSSL() {
|
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']));
|
$destURL = str_replace('http:', 'https:', Director::absoluteURL($_SERVER['REQUEST_URI']));
|
||||||
|
|
||||||
header("Location: $destURL", true, 301);
|
header("Location: $destURL", true, 301);
|
||||||
|
Loading…
Reference in New Issue
Block a user