Answer the question
In order to leave comments, you need to log in
Why can't firefox connect to socket (laravel-echo-server)?
Hello! I do event broadcasting via laravel-echo-server + https. In all browsers everything works correctly, firefox writes the following error:
Во время загрузки страницы соединение с wss://domain.ru:6001/socket.io/?EIO=3&transport=websocket было прервано. app.js:44502:12
Firefox не может установить соединение с сервером wss://domain.ru:6001/socket.io/?EIO=3&transport=websocket.
window.Echo = new Echo({
broadcaster: "socket.io",
host: window.location.hostname + ":6001",
transports: ["websocket", "polling", "flashsocket"],
auth: {
headers: {
Authorization: "Bearer token"
},
},
})
{
"authHost": "https://domain.ru",
"authEndpoint": "/api/broadcasting/auth",
"clients": [
],
"database": "redis",
"databaseConfig": {
"redis": {},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": true,
"host": null,
"port": "6001",
"protocol": "https",
"socketio": {},
"sslCertPath": "путь_к_сертификату.crt",
"sslKeyPath": "путь_к_сертификату.key",
"sslCertChainPath": "",
"sslPassphrase": "",
"subscribers": {
"http": true,
"redis": true
},
"apiOriginAllow": {
"allowCors": true,
"allowOrigin": "https://domain.ru",
"allowMethods": "GET, POST",
"allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id"
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question