How do you connect with your websockets? If the server's host is different than your frontend, you should configure that in the websocket connection.
If you use Laravel Echo, change the authEndpoint:
new Echo(
broadcaster: 'pusher', // The broadcaster you're using
key: pusherKey, // The key of the broadcaster
wsHost: localhost, // The host of the websocket server
wsPort: 6001, // The port of the websocket server
authEndpoint: http://localhost:8000/broadcasting/auth, // The endpoint for authorization
disableStats: true, // Disable sending stats to broadcast service
enabledTransports: ['ws', 'wss'], // The enabled transports (this will only use websockets. if you don't add this, it could fall back to xhr-streaming or polling)
);