No change on the server-side, this matches the client release.
No change on the server-side, this matches the client release.
More details about this release in the blog post: https://socket.io/blog/engine-io-4-release/
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
}
})
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.