修复获取ws地址bug

This commit is contained in:
sugar1569 2021-10-27 20:01:12 +08:00
parent a76709236e
commit aafde99ccf

View File

@ -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')) {
/**
* 抛出异常处理