]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Support HTTPS connections when $root is not configured
authorChristian Weiske <cweiske@cweiske.de>
Wed, 4 May 2011 05:24:52 +0000 (07:24 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 4 May 2011 05:24:52 +0000 (07:24 +0200)
doc/ChangeLog
src/SemanticScuttle/constants.php

index dacee5aed712217e8c1eb7fee3ac19c94a7ec856..d9b6f57fd21591e61ebeb497b4645b343a070344 100644 (file)
@@ -15,6 +15,7 @@ ChangeLog for SemantiScuttle
 - api/posts/add respects the "replace" parameter now
 - Fix privacy issue when fetching tags of several users
 - Only URLs with an allowed protocol may be added to the database
+- Support HTTPS connections when $root is not configured
 
 
 0.97.2 - 2011-02-17
index b0238406c1e577e5e15a411e5c4b343949cf9d5d..f8567d9625dc210b93c55dd939e5994427f2037d 100644 (file)
@@ -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']);
 }