You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are socket.request.headers, socket.conn.request.headers and socket.handshake.headers all referencing the same thing, so this is just a suggestion for a clearer interface around request data.
I think the official way is the handshake object: socket.handshake.headers.
We can indeed remove the other references (which were added a long time ago), but that will be a breaking change. We could schedule it for v4, what do you think?
To decide what is the official way is probably up to you, I just vote for cleaner interface.
One way instead of three seems better to me ... also for users to understand.
The next major version makes sense.
There are
socket.request.headers
,socket.conn.request.headers
andsocket.handshake.headers
all referencing the same thing, so this is just a suggestion for a clearer interface around request data.Socket.IO server version:
3.1.0
https://github.com/socketio/socket.io/blob/3.1.0/lib/socket.ts#L126
https://github.com/socketio/socket.io/blob/3.1.0/lib/socket.ts#L587-L589
https://github.com/socketio/socket.io/blob/3.1.0/lib/socket.ts#L596-L598
The text was updated successfully, but these errors were encountered: