Repository navigation
Releases
Releases · dartondox/dox-socketio
3.1.0
No breaking change.
New
SocketAuth: a middleware that logs a socket in when it connects. The user is insocket.user. With no user, the client getsconnect_error.handshake.token:auth.token, else theAuthorization: Bearerheader.handshake.cookie(name): reads a cookie, decrypted likereq.cookie(name).await handshake.session(): loads the Dox session of the client.ServerOptions(allowedOrigins:): turns on an origin check, with the same rule as dox_core.[]allows the same host only, a list also allows those sites,['*']allows all. Other origins get 403. The default (null) keeps the 3.0.0 rule.- With no
allowedOrigins, the server prints one warning at start that any site can connect.
final session = await handshake.session();
final user = await Auth(guard: 'web').userFromSession(session);Fixes
- Origin matching for
corsignores case and a trailing/. handshake.tokenreadsBearerin any case.
Docs: Socket.IO
Full list: the CHANGELOG.
3.0.0
The first stable release of dox_socketio.
A Socket.IO v4 server for Dox. It works with the official Socket.IO clients, and has a Redis adapter for many servers.