-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send Additional Cookies in Handshake #557
Comments
darrachequesne
added a commit
that referenced
this issue
Apr 30, 2021
Those events will be emitted before the response headers are written to the socket: - "initial_headers": on the first request of the connection - "headers": on all requests Syntax: ```js server.on("initial_headers", (headers, req) => { headers["test"] = "123"; headers["set-cookie"] = "mycookie=456"; }); server.on("headers", (headers, req) => { headers["test"] = "789"; }); ``` Related: - #557 - socketio/socket.io#3630
darrachequesne
added a commit
that referenced
this issue
Apr 30, 2021
Those events will be emitted before the response headers are written to the socket: - "initial_headers": on the first request of the connection - "headers": on all requests (HTTP long-polling and WebSocket upgrade) Syntax: ```js server.on("initial_headers", (headers, req) => { headers["test"] = "123"; headers["set-cookie"] = "mycookie=456"; }); server.on("headers", (headers, req) => { headers["test"] = "789"; }); ``` Related: - #557 - socketio/socket.io#3630
This was implemented in 2527543, and included in Syntax: server.on("initial_headers", (headers, req) => {
headers["test"] = "123";
headers["set-cookie"] = "mycookie=456";
});
server.on("headers", (headers, req) => {
headers["test"] = "789";
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: for support questions, please use one of these channels: stackoverflow or slack
You want to:
Current behaviour
Steps to reproduce (if the current behaviour is a bug)
Expected behaviour
Setup
Other information (e.g. stacktraces, related issues, suggestions how to fix)
I would like to add a feature to allow additional cookies besides just
this.cookie || 'io'
to be set in the handshake.I will have an example shortly.
Edited
jaykravetz@3b629d2
The text was updated successfully, but these errors were encountered: