From b5bb9c027279c4880b48784132960ae2d7577200 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 19 Nov 2022 21:11:38 -0800 Subject: [PATCH] Fix rutorrent widget always uses port 80 Closes #538 --- src/widgets/rutorrent/proxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/rutorrent/proxy.js b/src/widgets/rutorrent/proxy.js index dae50c353..604b08969 100644 --- a/src/widgets/rutorrent/proxy.js +++ b/src/widgets/rutorrent/proxy.js @@ -13,7 +13,7 @@ export default async function rutorrentProxyHandler(req, res) { const rutorrent = new RuTorrent({ host: constructedUrl.hostname, - port: constructedUrl.port, + port: constructedUrl.port !== '' ? constructedUrl.port : (constructedUrl.protocol === "https:" ? 443 : 80), path: constructedUrl.pathname, ssl: constructedUrl.protocol === "https:", username: widget.username,