From bfd6515739186a3ee9bbe11aba9dcc7d9b59e614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Fri, 20 Aug 2021 14:06:09 +0800 Subject: [PATCH] * finish task #41554. --- module/doc/view/content.html.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index bfeae40dee..e922a372db 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -73,10 +73,10 @@ $sessionString .= session_name() . '=' . session_id(); { $url = $doc->content; if(!preg_match('/^https?:\/\//', $doc->content)) $url = 'http://' . $url; - $urlIsHttps = strpos($url, 'https://') === 0; - $serverIsHttps = ((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') or (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https')); + $urlIsHttps = strpos($url, 'https://') === 0; + $ztIsHttps = ((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') or (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https')); - if(($urlIsHttps and $serverIsHttps) or (!$urlIsHttps and !$serverIsHttps)) + if(($urlIsHttps and $ztIsHttps) or (!$urlIsHttps and !$ztIsHttps)) { echo ""; }