From ac6a6d069b70d19c93f034832630a49f869257fb Mon Sep 17 00:00:00 2001 From: RblSb Date: Tue, 8 Dec 2020 21:19:58 +0300 Subject: Fix proxy urls with ports closes RblSb/SyncTube-octosubs#1 --- build/server.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'build/server.js') diff --git a/build/server.js b/build/server.js index 8504332..4df6b9f 100644 --- a/build/server.js +++ b/build/server.js @@ -1,4 +1,4 @@ -// Generated by Haxe 4.1.1 +// Generated by Haxe 4.1.4 (function ($global) { "use strict"; var $estr = function() { return js_Boot.__string_rec(this,''); },$hxEnums = $hxEnums || {},$_; function $extend(from, fields) { @@ -3575,6 +3575,9 @@ server_HttpServer.proxyRequest = function(url,req,res,fn) { if(url1.host == req.headers["host"]) { return null; } + if(url1.host.indexOf(":") != -1) { + url1.host = url1.host.split(":")[0]; + } var proxy = (url1.protocol == "https:" ? js_node_Https.request : js_node_Http.request)({ host : url1.host, port : Std.parseInt(url1.port), path : url1.pathname + url1.search, method : req.method},function(proxyReq) { if(fn(proxyReq)) { return; @@ -4169,7 +4172,7 @@ server_Main.prototype = { if(this.videoList.length == 0) { return; } - if(!((client.group & 2) != 0)) { + if((client.group & 2) == 0) { return; } this.videoTimer.setTime(data.pause.time); @@ -4180,7 +4183,7 @@ server_Main.prototype = { if(this.videoList.length == 0) { return; } - if(!((client.group & 2) != 0)) { + if((client.group & 2) == 0) { return; } this.videoTimer.setTime(data.play.time); @@ -4240,7 +4243,7 @@ server_Main.prototype = { if(!this.checkPermission(client,"requestLeader")) { return; } - } else if(!((client.group & 2) != 0) && clientName != "") { + } else if((client.group & 2) == 0 && clientName != "") { if(!this.checkPermission(client,"setLeader")) { return; } @@ -4273,7 +4276,7 @@ server_Main.prototype = { if(this.videoList.length == 0) { return; } - if(!((client.group & 2) != 0)) { + if((client.group & 2) == 0) { return; } this.videoTimer.setRate(data.setRate.rate); @@ -4283,7 +4286,7 @@ server_Main.prototype = { if(this.videoList.length == 0) { return; } - if(!((client.group & 2) != 0)) { + if((client.group & 2) == 0) { return; } this.videoTimer.setTime(data.setTime.time); @@ -4614,7 +4617,7 @@ sys_FileSystem.createDirectory = function(path) { var stat; try { stat = js_node_Fs.statSync(path); - } catch( _g ) { + } catch( _g2 ) { throw _g1; } if(!stat.isDirectory()) { -- cgit v1.2.3