web-socket
web-socket copied to clipboard
Connection but no communication with websocket and exposing/sharing with ngrok
Basically I need to provide public access to Laravel restful api's and a websocket to a couple third parties for services.
If I hit the socket locally, site.test:8000, works fine and get 2-way communication. But when using ngrok to make public it will connect and I can log that the open method of my socket handler is hit but never hits the message method and connection closes after few seconds.
No errors in site log, php, nginx or ngrok console which just shows: GET /mysocket 101 Switching Protocols. Is there somewhere else I can look?
I have also tried spinning the websocket off into it's own vagrant box and using ' ngrok http -host-header=rewrite site.test:8000' to route all traffic to the service and bypass nginx proxy but works the same - can connect but no communication and fails shortly.
Hoping if anyone here has experience with this senario and can point me in the right direction.
Thanks!