Fix non-localhost server can't connect WebSocket bug

Fix non-localhost server can't connect WebSocket problem.