laravel-echo-server
laravel-echo-server copied to clipboard
Redis keyPrefix does not work
Redis prefix does nothing
laravel-echo-server version: 1.6.2
laravel-echo-server.json:
{
"authHost": "http://localhost:8087",
"authEndpoint": "/broadcasting/auth",
"clients": [
],
"database": "redis",
"databaseConfig": {
"redis": {
"port": "16378",
"host": "localhost",
"keyPrefix": "my-redis-prefix"
},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": true,
"host": null,
"port": "6001",
"protocol": "http",
"socketio": {},
"secureOptions": 67108864,
"sslCertPath": "",
"sslKeyPath": "",
"sslCertChainPath": "",
"sslPassphrase": "",
"subscribers": {
"http": true,
"redis": true
},
"apiOriginAllow": {
"allowCors": false,
"allowOrigin": "",
"allowMethods": "",
"allowHeaders": ""
}
}
Events still are:
Hi, if you are still having the issue I can help because I had the same problem. IMHO This depends on the Laravel configuration.
If don't have a Redis prefix isn't an issue for you, try to insert this in your Laravel .env file:
#leave REDIS_PREFIX empty but present or the laravel-echo client won't work
REDIS_PREFIX=
I removed the prefix because laravel-echo-client creates a channel string putting the prefix in the wrong place. This causes a mismatch between the channel name used by the client and the one used by the server.