Skip to content

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 [email protected].

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