diff --git a/ChainPadSrv.js b/ChainPadSrv.js index 4ed6ff840..e2d7a9ef6 100644 --- a/ChainPadSrv.js +++ b/ChainPadSrv.js @@ -177,6 +177,7 @@ var create = module.exports.create = function (socketServer, store) { }; socketServer.on('connection', function(socket) { + if(socket.upgradeReq.url !== '/cryptpad_websocket_old') { return; } socket.on('message', function(message) { try { handleMessage(ctx, socket, message); diff --git a/server.js b/server.js index ce7d6ec49..f3d472dea 100644 --- a/server.js +++ b/server.js @@ -84,5 +84,6 @@ var wsSrv = new WebSocketServer(wsConfig); Storage.create(config, function (store) { console.log('DB connected'); NetfluxSrv.run(store, wsSrv); + ChainPadSrv.create(wsSrv, store); WebRTCSrv.run(wsSrv); });