mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-03 09:55:57 -05:00
Merge pull request #4218 from si458/patch-1
if header is not null for websockets
This commit is contained in:
commit
513e5b5ade
14
apprelays.js
14
apprelays.js
@ -642,12 +642,14 @@ module.exports.CreateWebRelay = function (parent, db, args, domain) {
|
||||
}
|
||||
} else {
|
||||
// Tunnel is now in web socket pass-thru mode
|
||||
if ((typeof header.connection == 'string') && (header.connection.toLowerCase() == 'upgrade')) {
|
||||
// Websocket upgrade succesful
|
||||
obj.socketParseState = 2;
|
||||
} else {
|
||||
// Unable to upgrade to web socket
|
||||
obj.close();
|
||||
if (header != null) {
|
||||
if ((typeof header.connection == 'string') && (header.connection.toLowerCase() == 'upgrade')) {
|
||||
// Websocket upgrade succesful
|
||||
obj.socketParseState = 2;
|
||||
} else {
|
||||
// Unable to upgrade to web socket
|
||||
obj.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user