-
|
Hello! Now I'm developing WebSocket signalling server in Erlang with Cowboy. However, example client is unable to work with my Cowboy server. It get stuck in stage "Upgrading to WebSocket". I'm not very familiar with example client, I only know that it is JS-based and using webpack 5.88.2. Internally, It starts "proxy" and then client connects to this proxy. Proxy somehow works with target HTTP/WebSocket server (my Cowboy server).
I've googled and AI-ed the situation. The most usable information was that the issue is somehow related to "CORS". That I need to enable it in Cowboy. However, instructions pointed to callback init/2 which is not even called, so I'm at a loss here. Cowboy module is started with: Console output from example client looks like:
Here I stopped Cowboy server and example client detected it. I'm not very familiar with all the stuff here so I'd love to have some advises where to look at. Much appreciated, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Hey, the best would be to use wireshark to capture the network data and check what it's doing under the hood. |
Beta Was this translation helpful? Give feedback.
-
|
For future reference: the client wanted to open address "/webrtc" for some reason. |
Beta Was this translation helpful? Give feedback.
For future reference: the client wanted to open address "/webrtc" for some reason.
I've added endpoint for this address and this solved the issue.