Detect borken websocket compression in NodeJS v11.11 to v12.15.
This commit is contained in:
parent
4256c470da
commit
d7df370215
|
@ -648,6 +648,17 @@ function CreateMeshCentralServer(config, args) {
|
|||
if (typeof obj.args.trustedproxy == 'string') { obj.args.trustedproxy = obj.args.trustedproxy.split(' ').join('').split(','); }
|
||||
if (typeof obj.args.tlsoffload == 'string') { obj.args.tlsoffload = obj.args.tlsoffload.split(' ').join('').split(','); }
|
||||
|
||||
// Check if WebSocket compression is supported. It's broken in NodeJS v11.11 to v12.15
|
||||
if ((obj.args.wscompression == true) || (obj.args.agentwscompression == true)) {
|
||||
const verSplit = process.version.substring(1).split('.');
|
||||
var ver = parseInt(verSplit[0]) + (parseInt(verSplit[1]) / 100);
|
||||
if ((ver >= 11.11) && (ver <= 12.15)) {
|
||||
obj.args.wscompression = obj.args.agentwscompression = false;
|
||||
obj.config.settings.wscompression = obj.config.settings.agentwscompression = false;
|
||||
addServerWarning('WebSocket compression is disabled, this feature is broken in NodeJS v11.11 to v12.15.');
|
||||
}
|
||||
}
|
||||
|
||||
// Local console tracing
|
||||
if (typeof obj.args.debug == 'string') { obj.debugSources = obj.args.debug.toLowerCase().split(','); }
|
||||
else if (typeof obj.args.debug == 'object') { obj.debugSources = obj.args.debug; }
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,4 +3,5 @@ CD ..\translate
|
|||
%LOCALAPPDATA%\..\Roaming\nvm\v12.13.0\node translate.js minifyall
|
||||
%LOCALAPPDATA%\..\Roaming\nvm\v12.13.0\node translate.js translateall
|
||||
%LOCALAPPDATA%\..\Roaming\nvm\v12.13.0\node translate.js extractall
|
||||
DEL ..\emails\translations\*-min_*
|
||||
DEL ..\emails\translations\*-min_*
|
||||
Pause
|
|
@ -11401,7 +11401,6 @@
|
|||
},
|
||||
{
|
||||
"en": "Format",
|
||||
"en": "Formaat",
|
||||
"xloc": [
|
||||
"default.handlebars->27->1473"
|
||||
]
|
||||
|
@ -14361,7 +14360,7 @@
|
|||
"es": "JSON",
|
||||
"fr": "JSON",
|
||||
"hi": "JSON",
|
||||
"ja": "JSON,
|
||||
"ja": "JSON",
|
||||
"ko": "JSON",
|
||||
"nl": "JSON",
|
||||
"pt": "JSON",
|
||||
|
@ -31731,4 +31730,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue