title: Django Socketio Nginx proxy & session cookie issue
body: <p>I have followed this tutorial: <a href="http://www.stephendiehl.com/?p=309" rel="nofollow">http://www.stephendiehl.com/?p=309</a> describing how to run a gevent pywsgi server serving Django with socketio behind a nginx front-end.</p>
  
  <p>As this tutorial says, Nginx doesn't support websocket unless using a tcp proxy module. This proxy module doesn't support the use of the same port for socketio and classic serving, from what I understood the configuration look like that:</p>
  
  <p>nginx listen on port 80</p>
  
  <p>nginx tcp proxy listen  on port 7000</p>
  
  <p>Everything is forwarded to port 8000</p>
  
  <p><strong>Problem:</strong> the resulting socketio request doesn't include the django cookie containing the session id so I have no information on the requesting user in my django view.</p>
  
  <p>I guess it's caused by the fact that the request is made to another port (7000) causing the browser to identify the request as cross-domain ?</p>
  
  <p>What would be the cleanest way to include the django cookie into the request ?</p>