aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/server.js5
-rw-r--r--src/server/HttpServer.hx3
2 files changed, 2 insertions, 6 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;
}
diff --git a/src/server/HttpServer.hx b/src/server/HttpServer.hx
index c81a464..0388c28 100644
--- a/src/server/HttpServer.hx
+++ b/src/server/HttpServer.hx
@@ -163,9 +163,8 @@ class HttpServer {
new URL(js.Node.global.decodeURI(url));
} catch (e) return null;
if (url.host == req.headers["host"]) return null;
- if (url.host.contains(":")) url.host = url.host.split(":")[0];
final options = {
- host: url.host,
+ host: url.hostname,
port: Std.parseInt(url.port),
path: url.pathname + url.search,
method: req.method
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage