mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
fix
This commit is contained in:
1 parent
dee7e6975e
commit
6e0682881b
1 file changed
+6
-13
@@ -4,19 +4,12 @@ import Session from '../models/session.js'
|
||||
import { defaultUser, genSessionJWT } from '../utils/auth.js'
|
||||
|
||||
export default (server) => {
|
||||
const io = new Server(
|
||||
server,
|
||||
{
|
||||
cors: {
|
||||
origin: '*',
|
||||
},
|
||||
const io = new Server(server, {
|
||||
cors: {
|
||||
origin: '*',
|
||||
},
|
||||
{
|
||||
cors: {
|
||||
origin: '*',
|
||||
},
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
io.use(async (socket, next) => {
|
||||
console.log('Authenticating...')
|
||||
try {
|
||||
@@ -61,7 +54,7 @@ export default (server) => {
|
||||
const stream = await attachContainer(container, { token })
|
||||
|
||||
stream.on('data', (chunk) => {
|
||||
socket.send(chunk.toString().toString())
|
||||
socket.send(chunk.toString())
|
||||
})
|
||||
|
||||
socket.on('message', function incoming(message) {
|
||||
|
||||
Reference in new issue
Block a user