aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/HttpServer.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-05-12 06:07:01 +0300
committerRblSb <msrblsb@gmail.com>2020-05-12 06:07:01 +0300
commit28a1d1c271dd722dc36cebc5b61f87d80138dba3 (patch)
treea09fda49dc8896af109a0746bef36a4a6c4c196e /src/server/HttpServer.hx
parent2f4005083452d61ddaf7542b195927b1d0d6227f (diff)
Minor improvements
Diffstat (limited to 'src/server/HttpServer.hx')
-rw-r--r--src/server/HttpServer.hx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/HttpServer.hx b/src/server/HttpServer.hx
index 0fc46fd..38cfcfe 100644
--- a/src/server/HttpServer.hx
+++ b/src/server/HttpServer.hx
@@ -6,7 +6,7 @@ import haxe.io.Path;
import js.node.Fs;
import js.node.Https;
import js.node.Http;
-import js.node.Url;
+import js.node.url.URL;
import js.node.http.IncomingMessage;
import js.node.http.ServerResponse;
import js.node.Path as JsPath;
@@ -136,12 +136,12 @@ class HttpServer {
static function proxyUrl(req:IncomingMessage, res:ServerResponse):Bool {
final url = req.url.replace("/proxy?url=", "");
- final url = Url.parse(js.Node.global.decodeURI(url));
+ final url = new URL(js.Node.global.decodeURI(url));
if (url.host == req.headers["host"]) return false;
final options = {
host: url.host,
port: Std.parseInt(url.port),
- path: url.path,
+ path: url.pathname + url.search,
method: req.method,
// headers: req.headers
};
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage