Connection closed before receiving a handshake response
Opened this issue · 1 comments
Deleted user commented
Salve,
i am using the js client provided by this repository (to create a websocket connection) but i am getting a "Connection closed before receiving a handshake response" error in my browser console. I really don't know what is going wrong and how to fix it. Maybe someone can have a look at my nginx.conf.
http {
server {
listen *:80;
server_name localhost;
autoindex off;
client_max_body_size 128M;
location /channels-stats {
deny all;
push_stream_channels_statistics;
push_stream_channels_path $arg_id;
}
location /pub {
deny all;
push_stream_publisher admin;
push_stream_channels_path $arg_id;
}
location ~ /sub/(.*) {
push_stream_subscriber;
push_stream_channels_path $1;
}
location ~ /ws/(.*) {
push_stream_subscriber websocket;
push_stream_channels_path $1;
push_stream_message_template "~text~";
push_stream_websocket_allow_publish on;
push_stream_ping_message_interval 10s;
}
}
}
Best regards
wandenberg commented
Have you tried do exactly like in this example. For the js client provided in the module the message_template matters.