Open hgaoping opened 3 years ago
Access to XMLHttpRequest at 'http://www.v10.com:6001/socket.io/?EIO=3&transport=polling&t=NRNfdTe' from origin 'http://www.v10.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
this is my laravel-echo-server.json
{ "authHost": "http://www.v10.com", "authEndpoint": "/broadcasting/auth", "clients": [], "database": "redis", "databaseConfig": { "redis": {}, "sqlite": { "databasePath": "/database/laravel-echo-server.sqlite" } }, "devMode": false, "host": null, "port": "6001", "protocol": "http", "socketio": {}, "secureOptions": 67108864, "sslCertPath": "", "sslKeyPath": "", "sslCertChainPath": "", "sslPassphrase": "", "subscribers": { "http": true, "redis": true }, "apiOriginAllow": { "allowCors": true, "allowOrigin": "http://www.v10.com", "allowMethods": "GET, POST", "allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id" } }
i got same issue
this is my laravel-echo-server.json
{ "authHost": "http://www.v10.com", "authEndpoint": "/broadcasting/auth", "clients": [], "database": "redis", "databaseConfig": { "redis": {}, "sqlite": { "databasePath": "/database/laravel-echo-server.sqlite" } }, "devMode": false, "host": null, "port": "6001", "protocol": "http", "socketio": {}, "secureOptions": 67108864, "sslCertPath": "", "sslKeyPath": "", "sslCertChainPath": "", "sslPassphrase": "", "subscribers": { "http": true, "redis": true }, "apiOriginAllow": { "allowCors": true, "allowOrigin": "http://www.v10.com", "allowMethods": "GET, POST", "allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id" } }
hi i got solution, you need runing laravel-echo-server init..you can't edit from laravel-echo-server.json
referense https://mrkaluzny.com/blog/using-laravel-echo-with-socket-io-and-vue-spa/
also getting this issue, it appears to be related to the new changes to socket.io.
also getting this issue, it appears to be related to the new changes to socket.io.
do you solve your issue ?
also getting this issue, it appears to be related to the new changes to socket.io.
do you solve your issue ?
sort of: i added cors to the socketio section of laravel-echo-server.json "socketio": { "cors": { "origin": true, "methods": ["GET", "POST"], "credentials": true } } and then on the laravel-echo client options i added withCredentials:true
it seemed to stop the error, however, its not upgrading from polling to websocket.
can you post your complete laravel-echo-server.json?
Just reinstall it, it may be a software package bug
I have been using Laravel 5.8 and can use the laravel-echo function normally
Reinstalled today and found that the software package was updated, and the following problems occurred