Hello people l have a problem with my nodejs server, l am running a javascript server on debian and localy works perfect, the problem beggins when l try to call it from outside the local network, my IP its fixed and and l have installed all l need since it works locally. Do you know if l need to change something on the server side or in the client side? My client:
socket = new WebSocket ('ws://172.17.31.7:8080', 'proof');
My server:
wsServer.on('request', function(request)
{
if ( ! originIsAllowed(request.origin))
{
// Make sure we only accept requests from an allowed origin
request.reject();
console.log((new Date()) + ' Connection from origin ' + request.origin + ' rejected.');
return;
}
var con = request.accept('proof', request.origin);
}