title: Socket.IO only works locally
body: <p>I have this Node.JS <strong>server</strong>:</p>
  
  <pre><code>var app = require('express')();
  var server = app.listen(80);
  var io = require('socket.io').listen(server);
  var posx = 10;
  var posy = 10;
  
  app.get('/', function (req, res) {
      res.sendfile( __dirname + '/index.html' );
  });
  
  io.sockets.on('connection', function (socket) {
      socket.emit('start', {
          x: posx,
          y: posy
      });
  
      socket.on('newpos', function (data) {
          posx = data["x"];
          posy = data["y"];
          socket.broadcast.emit('move', { x: posx, y: posy });
      });
  });
  </code></pre>
  
  <p><strong>CLIENT SIDE CODE:</strong></p>
  
  <pre><code>            var socket = io.connect('http://localhost');
  
              socket.on('start', function (data) {
                  $("#pointer").animate({
                      'top': data["y"],
                      'left': data["x"]
                  }, 0);
              });
  
              socket.on('move', function (data) {
                  $("#pointer").animate({
                      'top': data["y"],
                      'left': data["x"]
                  }, "slow");
              });
  
              $("#pointer").draggable({
                  stop: function(event, ui) {
                      var pos = $("#pointer").position();
  
                      socket.emit('newpos', {
                          'x': pos.left,
                          'y': pos.top
                      });
                  }
              });
  </code></pre>
  
  <p>The problem is that it seems to be only working locally.
  On ubuntu chrome I get:</p>
  
  <pre><code>XMLHttpRequest cannot load http://localhost/socket.io/1/?t=1344711676473. Origin http://192.168.1.130 is not allowed by Access-Control-Allow-Origin.
  </code></pre>
  
  <p>While on a mac, I am having a GET error for the same file...</p>
  
  <p>Any idea on what the problem might be?</p>