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 /src/server/HttpServer.hx | |
| parent | ac6a6d069b70d19c93f034832630a49f869257fb (diff) | |
Better url fix
Diffstat (limited to 'src/server/HttpServer.hx')
| -rw-r--r-- | src/server/HttpServer.hx | 3 |
1 files changed, 1 insertions, 2 deletions
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 |
