Server: nodejs + sockie.io + redis to get the login notification from the client (socketio)

1. The client cannot get the cookie value of the browser"s ApplicationERP _ session_local field because the cookie value is read-only;
clipboard.png

2.socket,headerserp_session_local.

clipboard.png

clipboard.png

clipboard.png

can 3.socket.io get the cookie value of erp_session_local of the Application of the browser?

Jul.14,2022

when websocket establishes a connection, does not put cookie in header, cookie is something in the http protocol. If you want to pass some data, you can put it on the url of websocket, for example, ws://host/the/path?para1=val1


when creating a connection, usually let the front end splice the data to the url and pass it to the back end

.
Menu