【发布时间】:2021-01-04 09:55:09
【问题描述】:
我正在使用 laravel_echo 0.2.2 和 pusher 进行聊天。
在调试模式下它工作得很好,但在发布模式下它不起作用。
我的回声配置是:
echo = new Echo({
'broadcaster': 'pusher',
'client': pusherClient,
"wsHost": 'api.salatkksa.com',
"httpHost": 'api.salatkksa.com',
"wsPort": 6001,
'auth': {
"headers": {'Authorization': 'Bearer $token'}
},
'authEndpoint': 'http://api.salatkksa.com/api/broadcasting/auth',
"disableStats": true,
"forceTLS": false,
"enabledTransports": ['ws', 'wss']
});
和我的推送器配置:
PusherOptions options = PusherOptions(
host: 'api.salatkksa.com',
port: 6001,
encrypted: false,
auth: PusherAuth('http://api.salatkksa.com/api/broadcasting/auth',
headers: {'Authorization': 'Bearer $token'}));
pusherClient = FlutterPusher(
"468adb0d5808c1",
options,
enableLogging: true,
);
我只是尝试将此添加到我的androidmanafist.xml 中的application 标记中:
android:usesCleartextTraffic="true"
那么,如果我添加 SSL 证书并使用加密消息传递,它会起作用吗?
【问题讨论】:
标签: flutter networking websocket laravel-echo