From 4f11edadff3e7aa8775bb3917a1fed143d58e366 Mon Sep 17 00:00:00 2001 From: Zheng Qian Date: Mon, 10 Dec 2018 17:45:55 +0800 Subject: [PATCH] luci-app-aria2: fix http/https protocol when opening aria2 webUI In the openWebUI function, the url is assumed as http protocol, this will cause problem when we login luci-admin with https. The variable localhostPath has already contained http/https protocol, so we can use it directly and add the path of aria2 webUI. Signed-off-by: Zheng Qian --- .../luci-app-aria2/luasrc/view/aria2/overview_status.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm b/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm index 34b7b3c641..a06d2015ff 100644 --- a/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm +++ b/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm @@ -67,7 +67,7 @@ function openWebUI(path) { var pathName = window.document.location.pathname; var pos = curWwwPath.indexOf(pathName); var localhostPath = curWwwPath.substring(0, pos); - var url = "http:" + localhostPath.substring(window.location.protocol.length) + "/" + path; + var url = localhostPath + "/" + path; window.open(url) }; //]]> -- 2.30.2