From ac6a6d069b70d19c93f034832630a49f869257fb Mon Sep 17 00:00:00 2001 From: RblSb Date: Tue, 8 Dec 2020 21:19:58 +0300 Subject: Fix proxy urls with ports closes RblSb/SyncTube-octosubs#1 --- src/server/HttpServer.hx | 1 + 1 file changed, 1 insertion(+) (limited to 'src/server') diff --git a/src/server/HttpServer.hx b/src/server/HttpServer.hx index 5a7c6ee..c81a464 100644 --- a/src/server/HttpServer.hx +++ b/src/server/HttpServer.hx @@ -163,6 +163,7 @@ 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, port: Std.parseInt(url.port), -- cgit v1.2.3