title: extraHeaders doesnt work in socket.io-client
body: <p>Hi my code looks like this in nodejs, it works! </p>
  
  <p>but when i try to use exactly same code in nwjs app, it doesn't! because as i sniff and see it thinks it runs under a web browser and it tries to use native functions of nwjs's chromium browser.</p>
  
  <pre><code>function connecttest(domain)
  {
  socket = require('socket.io-client')('https://ws.'+domain.replace('www.').replace('m.'),{
    forceNode:true,
    transports: ['websocket'],
    extraHeaders: {
        'Origin': 'https://www.'+domain.replace('www.').replace('m.')
    },
    transportOptions: {
      polling: {
        extraHeaders: {
          'Origin': 'https://www.'+domain.replace('www.').replace('m.')
        }
      }
    }
  });
  socket.on('connect',  function(socket){
      console.log("ok");
  socket.emit('query', {"body":{"siteId":"9","source":1,"lang":"tr"},"action":"site.session","frontEndId":0,"token":null});
  socket.on('response', function(data){
  console.log(data);
  });
  
  });
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/j1Pfv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j1Pfv.jpg" alt="fiddler sniff"></a> </p>
  
  <p>as you see it can not set a right origin header </p>
  
  <p><a href="https://i.stack.imgur.com/TRUUY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TRUUY.jpg" alt="but"></a> </p>
  
  <p>but it works under plain - nodejs script</p>