Skip to content

Commit 8ace013

Browse files
committed
upgrade shell app dependencies
ws 3 removed upgradeReq property: websockets/ws#1099 this is now a second argument to the connection callback i.e. wss.on('connection', function(ws, req){...
1 parent cfd3223 commit 8ace013

File tree

4 files changed

+490
-345
lines changed

4 files changed

+490
-345
lines changed

apps/shell/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ app.use(process.env.PASSENGER_BASE_URI || '/', router);
4444
var server = new http.createServer(app);
4545
var wss = new WebSocket.Server({ server: server });
4646

47-
wss.on('connection', function connection (ws) {
47+
wss.on('connection', function connection (ws, req) {
4848
var match;
4949
var host = process.env.DEFAULT_SSHHOST || 'localhost';
5050
var dir;
@@ -54,7 +54,7 @@ wss.on('connection', function connection (ws) {
5454
console.log('Connection established');
5555

5656
// Determine host and dir from request URL
57-
if (match = ws.upgradeReq.url.match(process.env.PASSENGER_BASE_URI + '/ssh/([^\\/]+)(.+)?$')) {
57+
if (match = req.url.match(process.env.PASSENGER_BASE_URI + '/ssh/([^\\/]+)(.+)?$')) {
5858
if (match[1] !== 'default') host = match[1];
5959
if (match[2]) dir = decodeURIComponent(match[2]);
6060
}

apps/shell/npm-shrinkwrap.json

-338
This file was deleted.

0 commit comments

Comments
 (0)