diff options
| author | RblSb <msrblsb@gmail.com> | 2020-12-09 20:10:47 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2020-12-09 20:10:47 +0300 |
| commit | 9ea69c94129f3e711dab4f47cd6011a398a42b89 (patch) | |
| tree | cb313902c81052ef75e80755444e799d8acaa511 /build | |
| parent | ac6a6d069b70d19c93f034832630a49f869257fb (diff) | |
Better url fix
Diffstat (limited to 'build')
| -rw-r--r-- | build/server.js | 5 |
1 files changed, 1 insertions, 4 deletions
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; } |
