system/applyreboot: Use the correct protocol, #603
authorManuel Munz <freifunk@somakoma.de>
Sun, 1 Sep 2013 16:39:55 +0000 (16:39 +0000)
committerManuel Munz <freifunk@somakoma.de>
Sun, 1 Sep 2013 16:39:55 +0000 (16:39 +0000)
modules/admin-full/luasrc/view/admin_system/applyreboot.htm

index 866d213f0556ee53f95cbe33819b914ff5be5ac4..56721a6104f55cf79dda9a25422b43047da4ae18 100644 (file)
@@ -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);
                //]]></script>
        </head>