summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-aria2/luasrc
diff options
context:
space:
mode:
authorZheng Qian <sotux82@gmail.com>2018-12-10 17:45:55 +0800
committerZheng Qian <sotux82@gmail.com>2018-12-10 17:45:55 +0800
commit4f11edadff3e7aa8775bb3917a1fed143d58e366 (patch)
tree94f73e38b79b130beb72653344d6b50360b93cf1 /applications/luci-app-aria2/luasrc
parent1b26c91a085c68d628b3098e52e85fb5f30b9af0 (diff)
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 <sotux82@gmail.com>
Diffstat (limited to 'applications/luci-app-aria2/luasrc')
-rw-r--r--applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm2
1 files changed, 1 insertions, 1 deletions
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)
};
//]]>