SSE middleware for connect