4 months ago

Laravel web sockets.

Posted 4 months ago by JorgeAlberto

Hello, I am doing a local project with which I send push notifications but I do not have an ssl certificate, however I can access the page but I cannot connect to the socket

window.Echo = new Echo({
    broadcaster: 'pusher',
    key: 'ESDASD2222',
    wsHost: '',
    wsPort: 6001,

    cluster: 'mt1',
    disableStats: false,
    scheme: 'http',
    // encrypted: true,
    transports: ['websocket', 'polling', 'flashsocket'],
    enabledTransports: ['ws', 'wss'],
    disabledTransports: ['sockjs', 'xhr_polling', 'xhr_streaming']

this is intended to connect securely to the sokect but I don't have a certificate to put it to socket.

pusher.js?782e:425 WebSocket connection to 'wss://' failed: Error during WebSocket handshake: Unexpected response code: 404

however I can connect if the protocol is just ws.

can you help me configure the echo instance to connect without the wss protocol

Thanks in advance

Please sign in or create an account to participate in this conversation.