Skip to content

Commit

Permalink
Fix issues with socket.io v2.4.0 (lynckia#1711)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcague authored May 19, 2021
1 parent 71fb501 commit 9f342f5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 0 additions & 3 deletions erizo_controller/erizoClient/lib/socket.io.js

This file was deleted.

2 changes: 1 addition & 1 deletion erizo_controller/erizoClient/src/Socket.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* global window */

import io from '../lib/socket.io';
import io from 'socket.io-client';
import Logger from './utils/Logger';
import { ReliableSocket } from '../../common/ReliableSocket';

Expand Down
4 changes: 4 additions & 0 deletions erizo_controller/erizoController/erizoController.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ const io = require('socket.io').listen(server, {
log: SOCKET_IO_ENABLE_LOGS,
pingInterval: SOCKET_IO_PING_INTERVAL,
pingTimeout: SOCKET_IO_PING_TIMEOUT,
allowRequest: (req, callback) => {
req.headers.origin = undefined;
callback(null, true);
},
});

io.set('transports', ['websocket']);
Expand Down
1 change: 1 addition & 0 deletions erizo_controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"prom-client": "~11.2.1",
"sdp-transform": "~2.3.0",
"socket.io": "~2.4.0",
"socket.io-client": "~2.4.0",
"uuid": "~3.1.0"
},
"contributors": [
Expand Down

0 comments on commit 9f342f5

Please sign in to comment.