From 9ea69c94129f3e711dab4f47cd6011a398a42b89 Mon Sep 17 00:00:00 2001 From: RblSb Date: Wed, 9 Dec 2020 20:10:47 +0300 Subject: Better url fix --- build/server.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'build/server.js') diff --git a/build/server.js b/build/server.js index 4df6b9f..45164db 100644 --- a/build/server.js +++ b/build/server.js @@ -3575,10 +3575,7 @@ 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) { + var proxy = (url1.protocol == "https:" ? js_node_Https.request : js_node_Http.request)({ host : url1.hostname, port : Std.parseInt(url1.port), path : url1.pathname + url1.search, method : req.method},function(proxyReq) { if(fn(proxyReq)) { return; } -- cgit v1.2.3