Skip to content
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 #571

Closed

Conversation

jaykravetz
Copy link

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behaviour

During the handshake, only the io cookie can be sent

New behaviour

This PR allows the override of a function (getAdditionalCookies) to send any other cookies required

Other information (e.g. related issues)

See issue #557

Any and all feedback is greatly appreciated.
Keep up the good work!

@darrachequesne
Copy link
Member

Superseded by 2527543, included in engine.io@5.1.0.

Syntax:

server.on("initial_headers", (headers, req) => {
  headers["test"] = "123";
  headers["set-cookie"] = "mycookie=456";
});

server.on("headers", (headers, req) => {
  headers["test"] = "789";
});

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants