From 69e58d8632198cf3eb39317d9382007731a10141 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 4 May 2011 07:24:52 +0200 Subject: Support HTTPS connections when $root is not configured --- src/SemanticScuttle/constants.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/SemanticScuttle/constants.php b/src/SemanticScuttle/constants.php index b023840..f8567d9 100644 --- a/src/SemanticScuttle/constants.php +++ b/src/SemanticScuttle/constants.php @@ -41,7 +41,10 @@ if (!isset($GLOBALS['root'])) { $rootTmp .= '/'; } - define('ROOT', 'http://'. $_SERVER['HTTP_HOST'] . $rootTmp); + //we do not prepend http since we also want to support https connections + // "http" is not required; it's automatically determined by the browser + // depending on the current connection. + define('ROOT', '//'. $_SERVER['HTTP_HOST'] . $rootTmp); } else { define('ROOT', $GLOBALS['root']); } -- cgit v1.2.3