From d5c34adcde5e0cc2b4854f98af7484f5c19ed7d9 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Tue, 23 Apr 2019 17:19:30 +0200 Subject: [PATCH] Prefer http over https for the debug interface to ease up things This is meant for local debugging only anyways and people seem to struggle with accepting self signed certs. --- nymea-app/ui/system/DeveloperTools.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nymea-app/ui/system/DeveloperTools.qml b/nymea-app/ui/system/DeveloperTools.qml index 8053c6cf..7f2bd888 100644 --- a/nymea-app/ui/system/DeveloperTools.qml +++ b/nymea-app/ui/system/DeveloperTools.qml @@ -17,9 +17,13 @@ Page { var tmp = engine.nymeaConfiguration.webServerConfigurations.get(i) print("checking config:", tmp.id, tmp.address, tmp.port, tmp.sslEnabled) if (tmp.address === engine.connection.currentConnection.hostAddress || tmp.address === "0.0.0.0") { - if (config === null || (!config.sslEnabled && tmp.sslEnabled)) { - config = tmp; + // This one prefers https over http... +// if (config === null || (!config.sslEnabled && tmp.sslEnabled)) { + + // ...but for now, prefer http because some things won't work with self signed certs etc... + if (config === null || (config.sslEnabled && !tmp.sslEnabled)) { + config = tmp; } continue; }