summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/constants.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-05-04 07:24:52 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-05-04 07:24:52 +0200
commit69e58d8632198cf3eb39317d9382007731a10141 (patch)
tree4b3b3a0fa65dc47f2ac8e95ec856104cdfd47142 /src/SemanticScuttle/constants.php
parente2c4b53ecb1b52a91249562b0e34b24f5e4d8d3e (diff)
downloadsemanticscuttle-69e58d8632198cf3eb39317d9382007731a10141.tar.gz
semanticscuttle-69e58d8632198cf3eb39317d9382007731a10141.tar.bz2
Support HTTPS connections when $root is not configured
Diffstat (limited to 'src/SemanticScuttle/constants.php')
-rw-r--r--src/SemanticScuttle/constants.php5
1 files changed, 4 insertions, 1 deletions
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']);
}