github socketio/engine.io v4.0.0-alpha.0

latest releases: 6.5.4, 6.5.3, 6.5.2...
pre-release4 years ago

Features

BREAKING CHANGES

  • the handlePreflightRequest option is removed by the change.

Before:

new Server({
  handlePreflightRequest: (req, res) => {
    res.writeHead(200, {
      "Access-Control-Allow-Origin": 'https://example.com',
      "Access-Control-Allow-Methods": 'GET',
      "Access-Control-Allow-Headers": 'Authorization',
      "Access-Control-Allow-Credentials": true
    });
    res.end();
  }
})

After:

new Server({
  cors: {
    origin: "https://example.com",
    methods: ["GET"],
    allowedHeaders: ["Authorization"],
    credentials: true
  }
})
  • the syntax has changed from
new Server({
  cookieName: "test",
  cookieHttpOnly: false,
  cookiePath: "/custom"
})

to

new Server({
  cookie: {
    name: "test",
    httpOnly: false,
    path: "/custom"
  }
})

All other options (domain, maxAge, sameSite, ...) are now supported.

  • v3.x clients will not be able to connect anymore (they will send a ping packet and timeout while waiting for a pong packet).

Links

Don't miss a new engine.io release

NewReleases is sending notifications on new releases.