可以在服务端看到这样的内容
[ActionCable] Broadcasting to message_channel: xxxx
但是前端连接 ws 接口时,却没有收到来自服务端的通知:xxx\ 目前前端已经可以连接服务端\ 连接成功时,服务端可以看到以下信息
Started GET "/adminapi/cable?authorization=2:zbiXF2xw8Qm-C9fmyBbp" for 172.18.0.1 at 2021-02-20 08:27:03 +0000
Started GET "/adminapi/cable/?authorization=2:zbiXF2xw8Qm-C9fmyBbp" [WebSocket] for 172.18.0.1 at 2021-02-20 08:27:03 +0000
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
Registered connection (Z2lkOi8vbXlhcHAvVXNlci8y)
前端可以收到这样的推送消息
{"type":"welcome"}
{"type":"ping","message":1613808763}