summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/index.php b/index.php
index d518bbc..e00f42a 100644
--- a/index.php
+++ b/index.php
@@ -3,6 +3,13 @@ include('config.php');
$signout = '<a href="' . basename($_SERVER['PHP_SELF']) . '?signout">Sign out</a>';
+// Respect HTTPS or not
+if (isset($_SERVER['HTTPS'])) {
+ $url = preg_replace("/^http:\/\//", "https://", $url);
+} else {
+ $url = preg_replace("/^https:\/\//", "http://", $url);
+}
+
if (isset($_GET) && count($_GET) > 0) {
$getstring = "?" . http_build_query($_GET);
} else {