so i have a server set up using hapi js and socket.io
var hapi = require('hapi');
var server = new hapi.Server();
server.connection({
host : 'localhost',
port: 3000,
routes: {cors: true}
});
var io = require("socket.io")(server.listener);
on the client
var io = socket.connect(':3000');
when i access from localhost everything works fine, but when i access from the external IP i get the CORS error and can't make it work, on the server i've tried io.set( "origins", "*:*" );
didn't work, and io.set('transports', ['websocket', 'xhr-polling', 'jsonp-polling', 'htmlfile', 'flashsocket']);
also didn't work and throws a bad request error on the browser.
am i missing something?
thanks you very much for your time.