Files
webman-buildadmin/app/common/library/admin/PushChannelConfigHelper.php
2026-04-18 15:48:31 +08:00

25 lines
579 B
PHP

<?php
declare(strict_types=1);
namespace app\common\library\admin;
/**
* 后台推送测试页:读取 webman/push 配置(与 game/Live::pushConfig 口径一致)
*/
final class PushChannelConfigHelper
{
public static function wsBaseUrl(): string
{
$ws = (string) config('plugin.webman.push.app.websocket');
$ws = str_replace('websocket://', 'ws://', $ws);
return str_replace('0.0.0.0', '127.0.0.1', $ws);
}
public static function appKey(): string
{
return (string) config('plugin.webman.push.app.app_key');
}
}