title: Socket.IO disconnect unwanted users
body: <p>I use this code : (Server side)</p>
  
  <pre><code>io.set('authorization', function (handshakeData, accept) {
    var domain = handshakeData.headers.referer.replace('http://','').replace('https://','').split(/[/?#]/)[0];
    if('myDomain.com'==domain)
      accept(null, true);
    else 
      return accept('Deny', false);
  });
  </code></pre>
  
  <p>But unwanted domain/user all time can use my server function and have access to my MongoDB (thought server).</p>
  
  <p>Can somebody help me how to secure my server?</p>
  
  <p>Or how to close only connection with unwanted user?</p>