diff --git a/modules/http/http.lua.in b/modules/http/http.lua.in index 4e6967cd853e11a416b215a025970df8e7a86e91..7d022a448ec50226b9389b06eb9c713838dd5bcb 100644 --- a/modules/http/http.lua.in +++ b/modules/http/http.lua.in @@ -115,7 +115,6 @@ local function serve_root() end -- Return index page return data - :gsub('{{ secure }}', stream:checktls() and 'true' or 'false') :gsub('{{ snippets }}', table.concat(rsnippets, '\n')) end end diff --git a/modules/http/static/kresd.js b/modules/http/static/kresd.js index ceb16ed1a550796bbd23c981018484711881436c..4b4047f4eb2cd032212caab9179e68828e6da96a 100644 --- a/modules/http/static/kresd.js +++ b/modules/http/static/kresd.js @@ -332,7 +332,7 @@ $(function() { } /* WebSocket endpoints */ - var wsStats = (secure ? 'wss://' : 'ws://') + location.host + '/stats'; + var wsStats = ('https:' == document.location.protocol ? 'wss://' : 'ws://') + location.host + '/stats'; var ws = new Socket(wsStats); ws.onmessage = function(evt) { var data = JSON.parse(evt.data); diff --git a/modules/http/static/main.tpl b/modules/http/static/main.tpl index d05522cb5a90189517ed46abb373445afa53e5ac..c6bdab32163fd4117d368e0696d2591ff62706d6 100644 --- a/modules/http/static/main.tpl +++ b/modules/http/static/main.tpl @@ -4,7 +4,6 @@ <title>{{ title }}</title> <script type="text/javascript"> var host = "{{ host }}"; - var secure = {{ secure }}; </script> <script src="jquery.js"></script> <script src="bootstrap.min.js"></script>