Can I access a cookie from Socket.io?

Using Socket.IO 0.8.7, you can access request headers via:

socket.handshake.headers

You can find more detail on this at https://github.com/LearnBoost/socket.io/wiki/Authorizing

Leave a Comment