1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-08-05 14:01:39 +08:00

修正websocket连接地址

This commit is contained in:
koogua 2021-10-03 14:53:17 +08:00
parent 6495cbfbe0
commit 1fe8c289a5

View File

@ -54,7 +54,7 @@ class PublicController extends Controller
*/
if ($this->request->isSecure()) {
list($domain) = explode(':', $websocket->connect_address);
$websocket['connect_url'] = sprintf('wss://%s/wss', $domain);
$content['connect_url'] = sprintf('wss://%s/wss', $domain);
} else {
$content['connect_url'] = sprintf('ws://%s', $websocket->connect_address);
}