diff --git a/src/meshwifi/meshhttp.cpp b/src/meshwifi/meshhttp.cpp index 897f8195..d6ab4edc 100644 --- a/src/meshwifi/meshhttp.cpp +++ b/src/meshwifi/meshhttp.cpp @@ -1142,8 +1142,15 @@ void handleBasicJS(HTTPRequest *req, HTTPResponse *res) "\n" " // Create new connection\n" " var httpconn = new meshtasticjs.IHTTPConnection();\n" - " let sslActive = false;\n" - " let deviceIp = '10.10.30.198'; // Your devices IP here\n" + "\n" + " // Set connection params\n" + " let sslActive;\n" + " if (window.location.protocol === 'https:') {\n" + " sslActive = true;\n" + " } else {\n" + " sslActive = false;\n" + " }\n" + " let deviceIp = window.location.hostname; // Your devices IP here\n" " \n" "\n" " // Add event listeners that get called when a new packet is received / state of device changes\n"