Laravel Echo and Socket IO transfer polling 404 ERR_CONNECTION_CLOSED in loop
P粉029057928
P粉029057928 2024-03-26 16:36:46
0
1
448

I'm building a website using Laravel Echo Server, Socket IO and Redis. The problem I'm facing is that everything works locally but not on my VPS server.

When the user enters a view that requires Socket IO, a 404 loop will occur. https://example.com:6001/socket.io/?EIO=4&transport=polling&t=O0DofMO net::ERR_CONNECTION_CLOSED

On FireFox I can see this error, described in more detail

##
P粉029057928
P粉029057928

reply all(1)
P粉269530053

Seems to be working now.

I configured laravel-echo-server.json to work over HTTPS.

This makes event broadcasting work again, but channel authentication does not.

So I changed the way Socket.IO is imported:

sssccc

to

sssccc

These changes worked.

Please note that removing the channel default prefix helps a lot.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!