From: Manuel Munz Date: Sun, 1 Sep 2013 16:39:55 +0000 (+0000) Subject: system/applyreboot: Use the correct protocol, #603 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=c16cbd527c393c33fef167ec0ddad63966db770d;ds=sidebyside system/applyreboot: Use the correct protocol, #603 --- diff --git a/modules/admin-full/luasrc/view/admin_system/applyreboot.htm b/modules/admin-full/luasrc/view/admin_system/applyreboot.htm index 866d213f0..56721a610 100644 --- a/modules/admin-full/luasrc/view/admin_system/applyreboot.htm +++ b/modules/admin-full/luasrc/view/admin_system/applyreboot.htm @@ -24,10 +24,10 @@ $Id$ img.onload = function() { window.clearInterval(interval); - location.href = 'http://<%=addr or luci.http.getenv("SERVER_NAME")%>/'; + location.href = ('https:' == document.location.protocol ? 'https://' : 'http://') + '<%=addr or luci.http.getenv("SERVER_NAME")%>/'; }; - img.src = 'http://<%=addr or luci.http.getenv("SERVER_NAME")%><%=resource%>/icons/loading.gif?' + Math.random(); + img.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + '<%=addr or luci.http.getenv("SERVER_NAME")%><%=resource%>/icons/loading.gif?' + Math.random(); }, 5000); //]]>