From aafde99ccfcb75a4a649cb7d61154135ea5d2fe7 Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Wed, 27 Oct 2021 20:01:12 +0800 Subject: [PATCH] =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96ws?= =?UTF-8?q?=E5=9C=B0=E5=9D=80bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/common.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crmeb/app/common.php b/crmeb/app/common.php index ab2085a06..3f21af38a 100644 --- a/crmeb/app/common.php +++ b/crmeb/app/common.php @@ -24,7 +24,7 @@ if (!function_exists('getWorkerManUrl')) { */ function getWorkerManUrl() { - $ws = $_SERVER['HTTPS'] == 'on' ? 'wss://' : 'ws://'; + $ws = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']) == 'on' ? 'wss://' : 'ws://'; $host = $_SERVER['HTTP_HOST']; $data['admin'] = $ws . $host . '/notice'; $data['channel'] = $ws . $host . '/msg'; @@ -32,7 +32,6 @@ if (!function_exists('getWorkerManUrl')) { } } - if (!function_exists('exception')) { /** * 抛出异常处理