title: How to pass nginx proxy url for socket
body: <p>I am using socket in my application,i want to pass socket connection url from nginx as proxy url.I am doing it like that</p>
  
  <p>My socket code</p>
  
  <pre><code>var socket = io.connect('/explorer/socket',{
        'reconnect': true,
        'reconnection delay': 500
      });
  </code></pre>
  
  <p>My nginx conf</p>
  
  <pre><code>location /explorer/socket {
                  proxy_pass    http://xxx.xxx.xx.xxx:3000;
          }
  </code></pre>
  
  <p>but it is not working,it is connecting to my localhost,but i want to connect with my proxy url which i have defined in nginx. so how can i pass proxy url inside io.connect ?</p>