25 lines
579 B
PHP
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');
|
|
}
|
|
}
|