diff options
-rw-r--r-- | index.php | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 { |