summaryrefslogtreecommitdiff
path: root/opensearch.php
diff options
context:
space:
mode:
Diffstat (limited to 'opensearch.php')
-rw-r--r--opensearch.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/opensearch.php b/opensearch.php
index 632a533..fb51430 100644
--- a/opensearch.php
+++ b/opensearch.php
@@ -5,7 +5,7 @@ include "data/config.php";
$domain =
htmlspecialchars(
- (strpos(strtolower($_SERVER['SERVER_PROTOCOL']), 'https') === false ? 'http' : 'https') .
+ ((isset($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on" || $_SERVER["HTTPS"] === 1)) ? "https" : "http") .
'://' . $_SERVER["HTTP_HOST"]
);